[ticket/649] Properly load language for permission settings in ACP

B3P-649
This commit is contained in:
Marc Alexander
2015-09-13 23:03:10 +02:00
parent 0845725ded
commit 12781a6fc8
13 changed files with 248 additions and 23 deletions

View File

@@ -72,6 +72,7 @@ class listener implements EventSubscriberInterface
'core.user_setup' => 'load_portal_language',
'core.viewonline_overwrite_location' => 'viewonline_page',
'core.page_header' => 'add_portal_link',
'core.permissions event' => 'load_permissions',
);
}
@@ -175,4 +176,17 @@ class listener implements EventSubscriberInterface
{
return $this->config['board_disable'] && !defined('SKIP_CHECK_DISABLED') && !$this->auth->acl_gets('a_', 'm_') && !$this->auth->acl_getf_global('m_');
}
/**
* Load permissions into permissions array
*
* @param array $event Event data
*/
protected function load_permissions($event)
{
$permissions = $event['permissions'];
$permissions['a_manage_portal'] = array('lang' => 'ACL_A_MANAGE_PORTAL', 'cat' => 'misc');
$permissions['u_view_portal'] = array('lang' => 'ACL_U_VIEW_PORTAL', 'cat' => 'misc');
$event['permissions'] = $permissions;
}
}