summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 38c5454)
raw | patch | inline | side by side (parent: 38c5454)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 05:50:21 +0000 (05:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 4 Apr 2008 05:50:21 +0000 (05:50 +0000) |
-Renamed sudoOptions
-Updated sudo base detection.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10178 594d385d-05f5-0310-b6e9-bd551577e9d8
-Updated sudo base detection.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10178 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/sudo/class_sudoManagement.inc | patch | blob | history | |
gosa-core/plugins/admin/sudo/class_sudoOptions.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/sudo/class_sudoManagement.inc b/gosa-core/plugins/admin/sudo/class_sudoManagement.inc
index 19db54eb494043a8c7cc554320da3bacb5918312..febf43b31340aed8ace6659f161221681308aadc 100644 (file)
/* Save configuration for internal use */
$this->config = &$config;
$this->ui = &$ui;
- $this->base = get_ou("sudoou");
+ $this->base = @get_ou("sudoou");
+ /***
+ GET sudo base
+ ***/
if(empty($this->base)){
- //FIXME Optimize this message, maybe with msgPool
- msg_dialog::display(_("Configuration"),sprintf(_("The sudo object path is not configured.")));
+ /* Default is ou=sudoers,BASE */
+ $this->base = "ou=sudoers,".$this->config->current['BASE'];
+ }else{
+
+ /* Append base to given sudoers ou if missing */
+ if(!preg_match("/".normalizePreg($this->config->current['BASE'])."$/i",$this->base)){
+ if(!preg_match("/,$/",$this->base)){
+ $this->base = $this->base.",".$this->config->current['BASE'];
+ }else{
+ $this->base = $this->base.$this->config->current['BASE'];
+ }
+ }
}
/* Create dialog object */
diff --git a/gosa-core/plugins/admin/sudo/class_sudoOptions.inc b/gosa-core/plugins/admin/sudo/class_sudoOptions.inc
index 838dc138d2c58ecc28be678eb1cdba03ef95b0a0..43a39b140b8c1e81e54fdb36602168628bafca71 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-class sudo_options extends plugin
+class sudoOption extends plugin
{
/* Group attributes */
var $sudoOption = array();
var $options = array();
- function sudo_options(&$config, $dn= NULL)
+ function sudoOption(&$config, $dn= NULL)
{
plugin::plugin ($config, $dn);