]> git.mjollnir.org Git - s9y.git/commitdiff
initially Support adding new privileges
authorgarvinhicking <garvinhicking>
Thu, 9 Mar 2006 10:52:56 +0000 (10:52 +0000)
committergarvinhicking <garvinhicking>
Thu, 9 Mar 2006 10:52:56 +0000 (10:52 +0000)
include/functions_config.inc.php

index 9e25b995ff74cc075edb0aba347c9e9af17f476e..6ba8bf08c597d234b12ba564a7c8faefd2ca9829 100644 (file)
@@ -1234,9 +1234,10 @@ function serendipity_intersectGroup($checkuser = null, $myself = null) {
  * @param   int     The ID of the group to update
  * @param   array   The associative array of permission names
  * @param   array   The associative array of new values for the permissions. Needs the same associative keys like the $perms array.
+ * @param   bool    Indicates if an all new privilege should be inserted (true) or if an existing privilege is going to be checked
  * @return true
  */
-function serendipity_updateGroupConfig($groupid, &$perms, &$values) {
+function serendipity_updateGroupConfig($groupid, &$perms, &$values, $isNewPriv = false) {
     global $serendipity;
 
     if (!serendipity_checkPermission('adminUsersGroups')) {
@@ -1265,7 +1266,7 @@ function serendipity_updateGroupConfig($groupid, &$perms, &$values) {
             $value = 'false';
         }
 
-        if (!serendipity_checkPermission($perm)) {
+        if ($isNewPriv == false && !serendipity_checkPermission($perm)) {
             if (!isset($storage[$perm])) {
                 $value = 'false';
             } else {