]> git.mjollnir.org Git - s9y.git/commitdiff
Change of behavior: If a user does not have a certain privilege, he should not be...
authorgarvinhicking <garvinhicking>
Mon, 6 Jun 2005 07:45:00 +0000 (07:45 +0000)
committergarvinhicking <garvinhicking>
Mon, 6 Jun 2005 07:45:00 +0000 (07:45 +0000)
include/admin/groups.inc.php
include/functions_config.inc.php

index 323822b3fefa20a0bb0df0898cc7aaefb46d6c51..1897924e72f098178bc725e69c51d7d2962a0eb3 100644 (file)
@@ -153,7 +153,7 @@ foreach($allusers AS $user) {
             $section = $perm;
         }
 
-        if (in_array('protected', $userlevels, true) && !serendipity_checkPermission($perm)) {
+        if (!serendipity_checkPermission($perm)) {
             echo "<tr>\n";
             echo "<td>$indent" . htmlspecialchars($perm) . "</td>\n";
             echo '<td>' . $indentB . ' ' . (!empty($selected) ? YES : NO) . '</td>' . "\n";
index 961a40c8beeb2dd3dd95274263d1278fd54f7b2b..06b9ebf29db01e0f716a4390bc25601474607a7e 100644 (file)
@@ -567,7 +567,7 @@ function serendipity_getPermissionNames() {
         'adminUsersMaintainSame'             
             => array(USERLEVEL_ADMIN, USERLEVEL_CHIEF),
         'adminUsersMaintainOthers'             
-            => array('protected', USERLEVEL_ADMIN),
+            => array(USERLEVEL_ADMIN),
         'adminUsersCreateNew'             
             => array(USERLEVEL_ADMIN, USERLEVEL_CHIEF),
         'adminUsersGroups'             
@@ -862,8 +862,12 @@ function serendipity_updateGroupConfig($groupid, &$perms, &$values) {
             $value = 'false';
         }
         
-        if (in_array('protected', $userlevels) && !serendipity_checkPermission($perm)) {
-            $value = $storage[$perm];
+        if (!serendipity_checkPermission($perm)) {
+            if (!isset($storage[$perm])) {
+                $value = 'false';
+            } else {
+                $value = $storage[$perm];
+            }
         }
 
         serendipity_db_query(