mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-26 03:22:37 +02:00
permission stuff .. what else ...
git-svn-id: file:///svn/phpbb/trunk@2860 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -105,19 +105,41 @@ if ( isset($HTTP_POST_VARS['update']) )
|
|||||||
{
|
{
|
||||||
switch ( $HTTP_POST_VARS['type'] )
|
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':
|
case 'user':
|
||||||
foreach ( $HTTP_POST_VARS['entries'] as $user_id )
|
$set = 'set_acl_user';
|
||||||
{
|
break;
|
||||||
$acl->set_acl($forum_id, $user_id, false, $HTTP_POST_VARS['option']);
|
|
||||||
}
|
case 'group':
|
||||||
|
$set = 'set_acl_group';
|
||||||
break;
|
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 )
|
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" : '' );
|
$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
|
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)";
|
$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)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user