Skip to content
Snippets Groups Projects
Commit b14310cd authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-4632: Create permission 'administer role expire configuration'

parent 8aad3848
No related branches found
No related tags found
1 merge request!67ISTWCMS-4632: Config access
......@@ -55,6 +55,11 @@ class UwNodeAccessCheck implements AccessInterface {
}
}
// Role Expire config: admin/config/system/role-expire.
if ($route_name === 'role_expire.config') {
return $account->hasPermission('administer role expire configuration') ? AccessResult::allowed() : AccessResult::forbidden();
}
// Get the node object, which is in the route match variable.
$node = $route_match->getParameter('node');
......
......@@ -22,6 +22,8 @@ class UwNodeAccessRouteSubscriber extends RouteSubscriberBase {
'entity.node.delete_form',
// Menu link edit pages.
'menu_ui.link_edit',
// Role Expire config: admin/config/system/role-expire.
'role_expire.config',
];
foreach ($access_route_names as $route_name) {
if ($route = $collection->get($route_name)) {
......
'access content access form':
title: 'Access content access form'
description: 'Allows access to the content access form.'
'administer role expire configuration':
title: 'Administer role expire configuration'
description: 'Allows access to admin/config/system/role-expire.'
restrict access: true
'bypass home page protection':
title: 'Bypass home page protection'
description: 'Allows taking actions that are not normally allowed for the home page, such as unpublishing.'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment