aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_permissions.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-10-04 13:09:10 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-10-04 13:09:10 +0000
commit30aeac65dccceab18e19318e5981118f150c0647 (patch)
tree409e1a742796ff1c988593c43f19a9533c258742 /phpBB/admin/admin_permissions.php
parentb5bbc005a51658c7496abdcad9b23e978fb7db68 (diff)
downloadforums-30aeac65dccceab18e19318e5981118f150c0647.tar
forums-30aeac65dccceab18e19318e5981118f150c0647.tar.gz
forums-30aeac65dccceab18e19318e5981118f150c0647.tar.bz2
forums-30aeac65dccceab18e19318e5981118f150c0647.tar.xz
forums-30aeac65dccceab18e19318e5981118f150c0647.zip
Well, here are all my changes ... don't blame me if things break :D
git-svn-id: file:///svn/phpbb/trunk@2923 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_permissions.php')
-rw-r--r--phpBB/admin/admin_permissions.php24
1 files changed, 19 insertions, 5 deletions
diff --git a/phpBB/admin/admin_permissions.php b/phpBB/admin/admin_permissions.php
index 43d79d4709..656ddcedcd 100644
--- a/phpBB/admin/admin_permissions.php
+++ b/phpBB/admin/admin_permissions.php
@@ -21,7 +21,7 @@
if ( !empty($setmodules) )
{
- if ( !$acl->get_acl_admin('auth') )
+ if ( !$auth->get_acl_admin('auth') )
{
return;
}
@@ -46,7 +46,7 @@ require('pagestart.' . $phpEx);
//
// Do we have forum admin permissions?
//
-if ( !$acl->get_acl_admin('auth') )
+if ( !$auth->get_acl_admin('auth') )
{
message_die(MESSAGE, $lang['No_admin']);
}
@@ -101,6 +101,13 @@ switch ( $mode )
break;
}
+//
+// Brief explanation of how things work when updating ...
+//
+// Granting someone any admin permissions grants them permissions
+// to all other options, e.g. Moderator and Forums across the board.
+// This is done via the acl class
+//
if ( isset($HTTP_POST_VARS['update']) )
{
switch ( $HTTP_POST_VARS['type'] )
@@ -116,7 +123,7 @@ if ( isset($HTTP_POST_VARS['update']) )
foreach ( $HTTP_POST_VARS['entries'] as $id )
{
- $acl->$set($forum_id, $id, $HTTP_POST_VARS['option']);
+ $auth->$set($forum_id, $id, $HTTP_POST_VARS['option']);
}
message_die(MESSAGE, 'Permissions updated successfully');
@@ -156,7 +163,7 @@ else if ( isset($HTTP_POST_VARS['delete']) )
foreach ( $HTTP_POST_VARS['entries'] as $id )
{
- $acl->$set($forum_id, $id, $option_ids);
+ $auth->$set($forum_id, $id, $option_ids);
}
message_die(MESSAGE, 'Permissions updated successfully');
@@ -344,9 +351,16 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
else
{
+ //
+ // Founder only operations ... these operations can
+ // only be altered by someone with founder status
+ //
+ $founder_sql = ( !$userdata['user_founder'] ) ? ' AND founder_only <> 1' : '';
+
$sql = "SELECT auth_option_id, auth_value
FROM " . ACL_OPTIONS_TABLE . "
- WHERE auth_value LIKE '" . $type_sql . "_%'";
+ WHERE auth_value LIKE '" . $type_sql . "_%'
+ $founder_sql";
$result = $db->sql_query($sql);
$auth_options = array();