summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-09 02:10:25 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-04-09 02:10:25 +0200
commitdc74cc38b50e3d8d144c844fd837cadf77fb86e4 (patch)
treeaa1788d6a732905f2ff03f26fb8a0d76385fc3b9
parent5e24d0e51906654f1fb4e1bc42c18f61f182ffc6 (diff)
downloadwebadmin-dc74cc38b50e3d8d144c844fd837cadf77fb86e4.tar.gz
Clause the overriding of readonly fields with more administrator rights
-rw-r--r--lib/kolab_client_task.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 7f14df4..e8fa114 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -877,8 +877,13 @@ class kolab_client_task
}
}
else {
- // No entry level rights, check on attribute level
- if (!in_array('write', $attribute_rights[$idx])) {
+ if (in_array('add', $entry_rights) && in_array('delete', $entry_rights)) {
+ if ($admin_auto_fields_rw) {
+ $fields[$idx]['readonly'] = false;
+ }
+ }
+ // Explicit attribute level rights, check for 'write'
+ elseif (!in_array('write', $attribute_rights[$idx])) {
$fields[$idx]['readonly'] = true;
}
}