Added portal permissions -- It is now possible to show the Portal only to the users and groups we want to
This commit is contained in:
@@ -23,8 +23,8 @@ class acp_portal_info
|
||||
'title' => 'ACP_PORTAL',
|
||||
'version' => '2.0.0',
|
||||
'modes' => array(
|
||||
'config' => array('title' => 'ACP_PORTAL_GENERAL_INFO', 'auth' => 'acl_a_portal', 'cat' => array('ACP_PORTAL')),
|
||||
'modules' => array('title' => 'ACP_PORTAL_MODULES', 'auth' => 'acl_a_portal', 'cat' => array('ACP_PORTAL')),
|
||||
'config' => array('title' => 'ACP_PORTAL_GENERAL_INFO', 'auth' => 'acl_a_manage_portal', 'cat' => array('ACP_PORTAL')),
|
||||
'modules' => array('title' => 'ACP_PORTAL_MODULES', 'auth' => 'acl_a_manage_portal', 'cat' => array('ACP_PORTAL')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -59,11 +59,13 @@ $versions = array(
|
||||
'2.0.0-dev2' => array(
|
||||
|
||||
'permission_add' => array(
|
||||
array('a_portal'),
|
||||
array('a_manage_portal', 1),
|
||||
array('u_view_portal', 1),
|
||||
),
|
||||
|
||||
'permission_set' => array(
|
||||
array('ADMINISTRATORS', 'a_portal', 'group'),
|
||||
array('ADMINISTRATORS', 'a_manage_portal', 'group'),
|
||||
array('REGISTERED', 'u_view_portal', 'group'),
|
||||
),
|
||||
|
||||
'table_add' => array(
|
||||
|
||||
@@ -100,5 +100,9 @@ $lang = array_merge($lang, array(
|
||||
'UP_TO_DATE' => '%s ist aktuell',
|
||||
'VERSION_CHECK' => 'MOD Version Check',
|
||||
|
||||
// Adding the permissions
|
||||
'acl_a_manage_portal' => array('lang' => 'Kann Portal-Einstellungen ändern', 'cat' => 'misc'),
|
||||
'acl_u_view_portal' => array('lang' => 'Kann das Portal sehen', 'cat' => 'misc'),
|
||||
|
||||
));
|
||||
?>
|
||||
@@ -98,5 +98,9 @@ $lang = array_merge($lang, array(
|
||||
'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema',
|
||||
'UP_TO_DATE' => '%s ist aktuell',
|
||||
'VERSION_CHECK' => 'MOD Version Check',
|
||||
|
||||
// Adding the permissions
|
||||
'acl_a_manage_portal' => array('lang' => 'Can alter Portal settings', 'cat' => 'misc'),
|
||||
'acl_u_view_portal' => array('lang' => 'Can view the Portal', 'cat' => 'misc'),
|
||||
));
|
||||
?>
|
||||
@@ -33,7 +33,7 @@ $user->setup('mods/portal');
|
||||
* Make sure we do an isset first,
|
||||
* else we will get errors if someone uninstalls the portal and forgets to remove portal.php
|
||||
*/
|
||||
if (!isset($config['board3_enable']) || !$config['board3_enable'])
|
||||
if (!isset($config['board3_enable']) || !$config['board3_enable'] || !$auth->acl_get('u_view_portal'))
|
||||
{
|
||||
redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user