X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_divListSystem.inc;h=488e882f66c4aebc76d4957a47c35573cebcac3c;hb=9695395f399e680d3fbb0c6b7a2df7d8b37d17c8;hp=5350eb7469ba5a8b810ac0ce70b8cf048a71990b;hpb=a638cd0656d26deb0aedff4257b5ec0ba1f636d3;p=gosa.git
diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc
index 5350eb746..488e882f6 100644
--- a/plugins/admin/systems/class_divListSystem.inc
+++ b/plugins/admin/systems/class_divListSystem.inc
@@ -102,7 +102,6 @@ class divListSystem extends MultiSelectWindow
$ui= get_userinfo();
$department = array();
foreach($this->module as $module){
-
$d = $ui->get_module_departments($module);
foreach($d as $department){
$departments[$department] = $department;
@@ -123,30 +122,69 @@ class divListSystem extends MultiSelectWindow
}
}
- $listhead = "
".
- "
".
- "
".
- "
".
- "
".
- "
![](images/list_seperator.png)
";
- $listhead .= $this->get_snapshot_header($this->selectedBase);
- $listhead .= "
".
- "
".
- "
".
- "
".
- "
".
- "
".
- "
![](images/list_seperator.png)
"._("Base")." ".
- "
".
+ /* If there is at least one c (Create) and one w (Write) acl in this combination
+ display the snapshot paste icon. BUT check the correct acls in the management plugin */
+ $all_module_acls = "";
+ foreach($this->module as $module){
+ $all_module_acls .= $ui->has_complete_category_acls($this->selectedBase,$module);
+ }
+
+ /* Must we add an additional seperator */
+ $add_sep = false;
+
+ /* Add default header */
+ $listhead = MultiSelectWindow::get_default_header();
+
+ /* Add snapshot icons */
+ if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){
+ $listhead .= $this->get_snapshot_header($this->selectedBase);
+ $add_sep = true;
+ }
+
+ /* Handle create icons */
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"terminal/termgeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"workstation/workgeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"server/servgeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"printer/printgeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"phone/phoneGeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ if(preg_match("/c/",$ui->get_permissions($this->selectedBase,"component/componentGeneric"))){
+ $add_sep = true;
+ $listhead .= "
";
+ }
+
+ /* Should we add a seperator ? */
+ if($add_sep){
+ $listhead .= "
![](images/list_seperator.png)
";
+ }
+
+ /* Add base selection */
+ $listhead .= _("Base")."
".
"
".
"
";
@@ -173,10 +211,10 @@ class divListSystem extends MultiSelectWindow
$img9 = "