summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca2b104)
raw | patch | inline | side by side (parent: ca2b104)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Nov 2008 10:23:05 +0000 (10:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 Nov 2008 10:23:05 +0000 (10:23 +0000) |
-The wrong base used used to check ACLs, this caused problem if user filter settings were used.
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12932 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@12932 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 79e6b57fd1ed008c6d8c2ee94f93cadcfdabc5de..9d88ec16146243cf393588f15841bd6d8f62e2b8 100644 (file)
$this->orig_cn = $this->cn;
$this->orig_base = $this->base;
+ $this->gosaApplicationFlags = preg_replace("/[^GDLMO]/","",$this->gosaApplicationFlags);
}
foreach($checks as $name => $flag){
if($this->acl_is_writeable($name)){
$set = isset($_POST[$name]) && $_POST[$name] == 1;
- if(!$set && preg_match("/".$flag."/",$this->gosaApplicationFlags)){
- $this->gosaApplicationFlags = preg_replace("/".$flag."/","",$this->gosaApplicationFlags);
+ if(!$set && strstr($this->gosaApplicationFlags,$flag)){
+ $this->gosaApplicationFlags = str_replace($flag,"",$this->gosaApplicationFlags);
}elseif($set && !preg_match("/".$flag."/",$this->gosaApplicationFlags)){
- $this->gosaApplicationFlags = preg_replace("/]/",$flag."]",$this->gosaApplicationFlags);
+ $this->gosaApplicationFlags .= $flag;
}
}
}
/* Get application script without header part, to check if we must save the script itself */
$script = preg_replace('/.*### END HEADER ###/s', '', $this->gotoLogonScript);
+ $this->gosaApplicationFlags ="[{$this->gosaApplicationFlags}]";
plugin::save();
$this->attrs["gosaApplicationIcon"]= $this->gosaApplicationIcon;
diff --git a/gosa-plugins/goto/admin/applications/class_applicationManagement.inc b/gosa-plugins/goto/admin/applications/class_applicationManagement.inc
index bf332fed67a4135eee35fc88da6a97963f8fc740..d4d18b060ec665bf7e40f9e9bc12c77fddc6c59a 100644 (file)
var $enableReleaseManagement = false;
var $start_pasting_copied_objects = FALSE;
+ var $acl_base ="";
var $app_base ="";
var $app_release ="";
var $acl_module = array("application");
/* Save configuration for internal use */
$this->config = &$config;
$this->ui = &$ui;
+ $this->acl_base = $this->config->current['BASE'];
/* Check if copy & paste is activated */
if($this->config->boolValueIsTrue("MAIN","COPYPASTE")){
/* Create new usertab object */
$this->apptabs= new apptabs($this->config,$this->config->data['TABS']['APPSTABS'], $this->dn,"application");
$this->apptabs->parent = &$this;
- $this->apptabs->set_acl_base($this->app_base);
+
+ /* Check if there is a snapshot dialog open */
+ if($this->IsReleaseManagementActivated()){
+ $this->apptabs->set_acl_base($this->acl_base);
+ }else{
+ $this->apptabs->set_acl_base($this->DivListApplication->selectedBase);
+ }
}
diff --git a/gosa-plugins/goto/admin/applications/class_divListApplication.inc b/gosa-plugins/goto/admin/applications/class_divListApplication.inc
index 2d7a31ab4693d6ed21f99ec39d4617e8633765c6..18a79c93ee38379baf6e1f8f0e68c06fe164d14a 100644 (file)
/* Get acls */
$ui = get_userinfo();
- $acl = $ui->get_permissions($this->selectedBase,"application/application");
- $acl_all = $ui->has_complete_category_acls($this->parent->app_base,"application");
+
+ if($this->parent->IsReleaseManagementActivated()){
+ $acl = $ui->get_permissions($this->parent->acl_base,"application/application");
+ $acl_all = $ui->has_complete_category_acls($this->parent->acl_base,"application");
+ }else{
+ $acl = $ui->get_permissions($this->selectedBase,"application/application");
+ $acl_all = $ui->has_complete_category_acls($this->parent->app_base,"application");
+ }
/* Create Layers menu */
$s = ".|"._("Actions")."|\n";
/* Append create options */
+ $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
+ " "._("Create")."|\n";
if(preg_match("/c/",$acl)) {
- $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
- " "._("Create")."|\n";
$s.= "...|<input class='center' type='image' src='images/list_new_app' alt=''>".
" "._("Application")."|appl_new|\n";
}