summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4fc03d)
raw | patch | inline | side by side (parent: f4fc03d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 May 2008 10:25:29 +0000 (10:25 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 May 2008 10:25:29 +0000 (10:25 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11025 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/groups/class_divListGroup.inc | patch | blob | history | |
gosa-core/plugins/admin/users/class_divListUsers.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/groups/class_divListGroup.inc b/gosa-core/plugins/admin/groups/class_divListGroup.inc
index 0b6e1c30e1967c0acff9e86418274df20dd24c22..6c3304f2b8a8088126ec0c1f94040b9f0d9dfc4a 100644 (file)
}
/* Get acls */
- $acls = $ui->get_permissions($this->selectedBase,"groups/group");
- $acl_all= $ui->has_complete_category_acls($this->selectedBase,"groups");
+ $acl = $ui->get_permissions($this->selectedBase,"groups/group");
/* Add default header */
" <input type='image' class='center' src='images/lists/submit.png' title='"._("Submit department")."' name='submit_department' alt='"._("Submit").
"'> ";
-
- /* Create Layers menu */
+ /* Create Layers menu */
$s = ".|"._("Actions")."|\n";
- $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
- " "._("Create")."|\n";
-
/* Append create options */
- if(preg_match("/c/",$acl_all)) {
+ 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='plugins/groups/images/new.png' alt=''>".
" "._("Group")."|group_new|\n";
}
}
/* Add multiple copy & cut icons */
- if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
- $s.= "..|---|\n";
+ $acl_all= $ui->has_complete_category_acls($this->selectedBase,"groups");
+
+ if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){
$s.= "..|<img src='images/lists/copy.png' alt='' border='0' class='center'>".
" "._("Copy")."|"."multiple_copy_systems|\n";
+ }
+ if(is_object($this->parent->CopyPasteHandler) && preg_match("/(r.*d|d.*r)/",$acl_all)){
$s.= "..|<img src='images/lists/cut.png' alt='' border='0' class='center'>".
" "._("Cut")."|"."multiple_cut_systems|\n";
+ }
- if($this->parent->CopyPasteHandler->entries_queued()){
- $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
- $s.="..|".$img." "._("Paste")."|editPaste|\n";
- }else{
- $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
- $s.="..|".$img." "._("Paste")."\n";
- }
+ /* Copy & paste icons */
+ if(is_object($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler->entries_queued()){
+ $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."|editPaste|\n";
+ }else{
+ $img = "<img border='0' class='center' src='images/lists/paste-grey.png' alt=''>";
+ $s.="..|".$img." "._("Paste")."\n";
}
/* Add snapshot icons */
/* Create action icons - copy & paste icons */
$acl = $ui->get_permissions($val['dn'],"groups/group");
- $acl_all= $ui->has_complete_category_acls($val['dn'],"groups");
+ $acl_all = $ui->has_complete_category_acls($val['dn'],"groups");
$actions= "";
- if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+ if(preg_match("/(r.*d|r.*d)/",$acl_all) && $this->parent->CopyPasteHandler){
$actions.= "<input class='center' type='image'
src='images/lists/cut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ }else{
+ $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
+ }
+
+ if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){
$actions.= "<input class='center' type='image'
src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
+ }else{
+ $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
}
/* Add edit icon */
src='images/lists/edit.png' alt='"._("edit")."' name='group_edit_%KEY%' title='"._("Edit this entry")."'>";
/* Add snapshot functionality */
- if(preg_match("/(c.*w|w.*c)/", $acl_all)){
+ if(preg_match("/(r.*w|w.*r)/",$acl_all)){
$actions.= $this->GetSnapShotActions($val['dn']);
+ }else{
+ $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
+ $actions.="<img src='images/empty.png' alt=' ' class='center'> ";
}
if(preg_match("/d/",$acl)){
$actions.= "<input class='center' type='image'
src='images/lists/trash.png' alt='"._("delete")."' name='group_del_%KEY%' title='"._("Delete this entry")."'>";
+ }else{
+ $actions.= "<img class='center' src='images/empty.png' alt=' '
+ title='"._("Not allowed")."'>";
}
-
$posix=$mail=$samba=$appl=$phone=$enviro=$empty;
if(isset($val['objectClass'])){
diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc
index ea408b79eb75024f6b64c08a007c5e876c320933..e8da8760bf57775ac86ecb1d9705611a77625c31 100644 (file)
/* Get copy & paste icon */
$acl = $ui->get_permissions($this->selectedBase,"users/user");
+ $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users");
/* Add default header */
$listhead = MultiSelectWindow::get_default_header();
}
}
- /* Add multiple copy & cut icons */
- $acl_all = $ui->has_complete_category_acls($this->selectedBase,"users");
if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){
$s.= "..|---|\n";
/* Add copy & cut icons */
$acl = $ui->get_permissions($val['dn'],"users/user");
- if(preg_match("/(r.*d|r.*d)/",$acl) && $this->parent->CopyPasteHandler){
+ $acl_all = $ui->has_complete_category_acls($val['dn'],"users");
+
+ if(preg_match("/(r.*d|r.*d)/",$acl_all) && $this->parent->CopyPasteHandler){
$action .= "<input class='center' type='image'
src='images/lists/cut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
}else{
$action.="<img src='images/empty.png' alt=' ' class='center'> ";
}
- if(preg_match("/r/",$acl) && $this->parent->CopyPasteHandler){
+ if(preg_match("/r/",$acl_all) && $this->parent->CopyPasteHandler){
$action.= "<input class='center' type='image'
src='images/lists/copy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}else{
name='user_edit_%KEY%' title='".msgPool::editButton(_("user"))."'>";
/* Add deactivate status if we are allowed to */
- if (preg_match("/w/",$acl)){
+ if (preg_match("/w/",$ui->get_permissions($val['dn'],"users/password"))){
$action.= $lock_status;
}else{
$action.="<img src='images/empty.png' alt=' ' class='center'>";
}
/* Add snapshot icon */
- if(preg_match("/(r.*w|w.*r)/",$acl)){
+ if(preg_match("/(r.*w|w.*r)/",$acl_all)){
$action.= $this->GetSnapShotActions($val['dn']);
}else{
$action.="<img src='images/empty.png' alt=' ' class='center'> ";
}
/* Add remove icon, if we are allowed to remove the current user */
- if(preg_match("/d/",$ui->get_permissions($val['dn'],"users/user"))) {
+ if(preg_match("/d/",$acl)) {
$action.= "<input class='center' type='image' src='images/lists/trash.png' alt='"._("delete")."'
name='user_del_%KEY%' title='"._("Delete user")."'>";
}else{