mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-04 13:35:13 +02:00
permission stuff .. what else ...
git-svn-id: file:///svn/phpbb/trunk@2860 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
03f5d64e39
commit
19f78622b0
@ -105,19 +105,41 @@ if ( isset($HTTP_POST_VARS['update']) )
|
||||
{
|
||||
switch ( $HTTP_POST_VARS['type'] )
|
||||
{
|
||||
case 'group':
|
||||
foreach ( $HTTP_POST_VARS['entries'] as $group_id )
|
||||
{
|
||||
$acl->set_acl($forum_id, false, $group_id, $HTTP_POST_VARS['option']);
|
||||
}
|
||||
break;
|
||||
case 'user':
|
||||
foreach ( $HTTP_POST_VARS['entries'] as $user_id )
|
||||
{
|
||||
$acl->set_acl($forum_id, $user_id, false, $HTTP_POST_VARS['option']);
|
||||
}
|
||||
$set = 'set_acl_user';
|
||||
break;
|
||||
|
||||
case 'group':
|
||||
$set = 'set_acl_group';
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ( $HTTP_POST_VARS['entries'] as $id )
|
||||
{
|
||||
$acl->$set($forum_id, $id, $HTTP_POST_VARS['option']);
|
||||
}
|
||||
|
||||
message_die(MESSAGE, 'Permissions updated successfully');
|
||||
}
|
||||
else if ( isset($HTTP_POST_VARS['delete']) )
|
||||
{
|
||||
switch ( $HTTP_POST_VARS['type'] )
|
||||
{
|
||||
case 'user':
|
||||
$set = 'delete_acl_user';
|
||||
break;
|
||||
|
||||
case 'group':
|
||||
$set = 'delete_acl_group';
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ( $HTTP_POST_VARS['entries'] as $id )
|
||||
{
|
||||
$acl->$set($forum_id, $id, $HTTP_POST_VARS['option']);
|
||||
}
|
||||
|
||||
message_die(MESSAGE, 'Permissions updated successfully');
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -530,13 +530,11 @@ class acl
|
||||
{
|
||||
foreach ( $user_auth as $user => $user_auth_ary )
|
||||
{
|
||||
$user_auth[$user][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = ( !isset($user_auth_ary[$auth_type][$auth_option]) ) ? "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option, $allow)" : ( ( $user_auth_ary[$auth_type][$auth_option] != $allow ) ? "UPDATE " . ACL_USERS_TABLE . " SET auth_allow_deny = $allow WHERE user_id = $user_id AND forum_id = $forum_id and auth_option_id = $auth_option" : '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_auth[$user_id][$auth_type][$auth_option] = $allow;
|
||||
$sql_ary[] = "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option, $allow)";
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user