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:
@@ -463,6 +463,7 @@ Deny from All
|
|||||||
break;]]></action>
|
break;]]></action>
|
||||||
</edit>
|
</edit>
|
||||||
</open>
|
</open>
|
||||||
|
<!-- @todo: check if we need this -- I guess not -->
|
||||||
<open src="includes/cache.php">
|
<open src="includes/cache.php">
|
||||||
<edit>
|
<edit>
|
||||||
<find><![CDATA[}
|
<find><![CDATA[}
|
||||||
@@ -545,7 +546,7 @@ Deny from All
|
|||||||
</edit>
|
</edit>
|
||||||
<edit>
|
<edit>
|
||||||
<find><![CDATA['U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),]]></find>
|
<find><![CDATA['U_PRIVATEMSGS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox'),]]></find>
|
||||||
<action type="before-add"><![CDATA[ 'U_PORTAL' => (isset($config['board3_enable']) && $config['board3_enable'] == true) ? append_sid("{$phpbb_root_path}portal.$phpEx") : '',]]></action>
|
<action type="before-add"><![CDATA[ 'U_PORTAL' => (isset($config['board3_enable']) && $config['board3_enable'] && $auth->acl_get('u_view_portal')) ? append_sid("{$phpbb_root_path}portal.$phpEx") : '',]]></action>
|
||||||
</edit>
|
</edit>
|
||||||
</open>
|
</open>
|
||||||
<open src="includes/session.php">
|
<open src="includes/session.php">
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ class acp_portal_info
|
|||||||
'title' => 'ACP_PORTAL',
|
'title' => 'ACP_PORTAL',
|
||||||
'version' => '2.0.0',
|
'version' => '2.0.0',
|
||||||
'modes' => array(
|
'modes' => array(
|
||||||
'config' => array('title' => 'ACP_PORTAL_GENERAL_INFO', '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_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(
|
'2.0.0-dev2' => array(
|
||||||
|
|
||||||
'permission_add' => array(
|
'permission_add' => array(
|
||||||
array('a_portal'),
|
array('a_manage_portal', 1),
|
||||||
|
array('u_view_portal', 1),
|
||||||
),
|
),
|
||||||
|
|
||||||
'permission_set' => array(
|
'permission_set' => array(
|
||||||
array('ADMINISTRATORS', 'a_portal', 'group'),
|
array('ADMINISTRATORS', 'a_manage_portal', 'group'),
|
||||||
|
array('REGISTERED', 'u_view_portal', 'group'),
|
||||||
),
|
),
|
||||||
|
|
||||||
'table_add' => array(
|
'table_add' => array(
|
||||||
|
|||||||
@@ -100,5 +100,9 @@ $lang = array_merge($lang, array(
|
|||||||
'UP_TO_DATE' => '%s ist aktuell',
|
'UP_TO_DATE' => '%s ist aktuell',
|
||||||
'VERSION_CHECK' => 'MOD Version Check',
|
'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',
|
'RELEASE_ANNOUNCEMENT' => 'Ankündigungsthema',
|
||||||
'UP_TO_DATE' => '%s ist aktuell',
|
'UP_TO_DATE' => '%s ist aktuell',
|
||||||
'VERSION_CHECK' => 'MOD Version Check',
|
'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,
|
* Make sure we do an isset first,
|
||||||
* else we will get errors if someone uninstalls the portal and forgets to remove portal.php
|
* 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));
|
redirect(reapply_sid($phpbb_root_path . 'index.' . $phpEx));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user