summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b3f163c)
raw | patch | inline | side by side (parent: b3f163c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Jul 2006 11:55:18 +0000 (11:55 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 21 Jul 2006 11:55:18 +0000 (11:55 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4275 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 6363daca18b29aeefbe01344865b3c490013c997..ca0dabf199bb7eba3a2f3c4edf2c0a1a390539bc 100644 (file)
/* Delete member */
function DelMember($type,$id)
{
+ /* Check if there was a printer "dn" given, or the "cn" */
+ foreach($this->member[$type] as $key => $printer){
+ if($printer['dn'] == $id) {
+ $id = key;
+ }
+ }
+
+ if(!$this->acl_is_writeable($type)){
+ print_red(sprintf(_("You are not allowed to remove the given object '%s' from the list of members of printer '%s'."),$id,$this->dn));
+ return(FALSE);
+ }
+
if(isset($this->member[$type][$id])){
unset($this->member[$type][$id]);
+ return(TRUE);
}
+ return(FALSE);
}
$types = array("AddUser","AddGroup","AddAdminUser","AddAdminGroup");
if(!in_array_ics($type, $types)){
print_red(sprintf(_("Illegal printer type while adding '%s' to the list of '%s' printers,"),$dn,$type));
- return;
+ return(FALSE);
+ }
+
+ if(!$this->acl_is_writeable($type)){
+ print_red(sprintf(_("You are not allowed to add the given object '%s' to the list of members of '%s'."),$dn,$this->dn));
+ return(FALSE);
}
/* Get name of index attributes */
foreach($types as $ctype){
if(isset( $this->member[$ctype][$name])){
print_red(sprintf(_("Can't add '%s' to the list of members, it is already used."),$attrs[$var][0]));
- return;
+ return(FALSE);
}
}
$this->member[$type][$attrs[$var][0]] = $attrs ;
}else{
print_red(sprintf(_("Can't add '%s' to list of members, it is not reachable."),$dn));
+ return(FALSE);
}
+ return(TRUE);
}
-
-
-
}