summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b65a01e)
raw | patch | inline | side by side (parent: b65a01e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Oct 2010 10:09:26 +0000 (10:09 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Fri, 15 Oct 2010 10:09:26 +0000 (10:09 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20057 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderEditDialog.inc | patch | blob | history |
diff --git a/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderEditDialog.inc b/gosa-plugins/groupware/personal/groupware/FolderWidget/class_FolderEditDialog.inc
index ec54aa69cac4b964f3700cc5175dbe8ad17023cf..ef8556130b3ff05fa496a691a2de183e173fb990 100644 (file)
// Name or ACL modified?
if(isset($_POST["permission_{$id}_name"])) {
+ $name = get_post("permission_{$id}_name");
$this->folderItem['acls'][$id]['name'] = get_post("permission_{$id}_name");
}
if(isset($_POST["permission_{$id}_acl"])) {
if(isset($_POST['permission_add'])){
$this->folderItem['acls'][] = array('name' => '', 'acl' => 0, 'type' => 'user');
}
+
$this->folderItem['acls'] = array_values($this->folderItem['acls']);
}
+
function isNew()
{
return($this->isNew);
}
+
+ function check()
+ {
+ $message = array();
+
+ // Check if we've duplicate ACL definitions for a user
+ $aclNames = array();
+ foreach($this->folderItem['acls'] as $entry){
+ if(!isset($aclNames[$entry['name']])){
+ $aclNames[$entry['name']] = TRUE;
+ }else{
+ $message[] = sprintf(_("Duplicate permission setting for user '%s'."), $entry['name']);
+ }
+ }
+
+ return($message);
+ }
+
+
function save()
{
+ // Remove empty ACL defintions
+ foreach($this->folderItem['acls'] as $id => $entry){
+ if(empty($entry['name'])) unset($this->folderItem['acls'][$id]);
+ }
+
return($this->folderItem);
}
}