mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-05 07:07:51 +02:00
[ticket/15325] Do not show non-local permissions for local data
PHPBB3-15325
This commit is contained in:
parent
d60998ba69
commit
6c45c1ff6b
@ -95,7 +95,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
}
|
||||
else
|
||||
{
|
||||
$hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%', ($scope == 'global') ? 0 : false) : $this->$acl_user_function($user_id, $auth_option . '%', ($scope == 'global') ? 0 : false);
|
||||
$hold_ary = ($group_id !== false) ? $this->acl_group_raw_data($group_id, $auth_option . '%') : $this->$acl_user_function($user_id, $auth_option . '%', ($scope == 'global') ? 0 : false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -776,6 +776,7 @@ class auth
|
||||
|
||||
$sql_group = ($group_id !== false) ? ((!is_array($group_id)) ? 'group_id = ' . (int) $group_id : $db->sql_in_set('group_id', array_map('intval', $group_id))) : '';
|
||||
$sql_forum = ($forum_id !== false) ? ((!is_array($forum_id)) ? 'AND a.forum_id = ' . (int) $forum_id : 'AND ' . $db->sql_in_set('a.forum_id', array_map('intval', $forum_id))) : '';
|
||||
$is_local = $forum_id !== false ? 'AND ao.is_local <> 0' : '';
|
||||
|
||||
$sql_opts = '';
|
||||
$hold_ary = $sql_ary = array();
|
||||
@ -787,9 +788,10 @@ class auth
|
||||
|
||||
// Grab group settings - non-role specific...
|
||||
$sql_ary[] = 'SELECT a.group_id, a.forum_id, a.auth_setting, a.auth_option_id, ao.auth_option
|
||||
FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . ' ao
|
||||
FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_OPTIONS_TABLE . " ao
|
||||
WHERE a.auth_role_id = 0
|
||||
AND a.auth_option_id = ao.auth_option_id ' .
|
||||
AND a.auth_option_id = ao.auth_option_id
|
||||
$is_local " .
|
||||
(($sql_group) ? 'AND a.' . $sql_group : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
@ -797,9 +799,10 @@ class auth
|
||||
|
||||
// Now grab group settings - role specific...
|
||||
$sql_ary[] = 'SELECT a.group_id, a.forum_id, r.auth_setting, r.auth_option_id, ao.auth_option
|
||||
FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . ' ao
|
||||
FROM ' . ACL_GROUPS_TABLE . ' a, ' . ACL_ROLES_DATA_TABLE . ' r, ' . ACL_OPTIONS_TABLE . " ao
|
||||
WHERE a.auth_role_id = r.role_id
|
||||
AND r.auth_option_id = ao.auth_option_id ' .
|
||||
$is_local
|
||||
AND r.auth_option_id = ao.auth_option_id " .
|
||||
(($sql_group) ? 'AND a.' . $sql_group : '') . "
|
||||
$sql_forum
|
||||
$sql_opts
|
||||
|
Loading…
x
Reference in New Issue
Block a user