From f0e2969b8686cfde0ae4c6e32d8f1b75583380fe Mon Sep 17 00:00:00 2001
From: Liam Morland <lkmorlan@uwaterloo.ca>
Date: Mon, 22 Mar 2021 11:41:13 -0400
Subject: [PATCH] Revert "ISTWCMS-4632: Create permission 'administer role
 expire configuration'"

This reverts commit b14310cdd35133ce460c7d3d065620e2d39a63bc.
---
 src/Access/UwNodeAccessCheck.php            | 5 -----
 src/Routing/UwNodeAccessRouteSubscriber.php | 2 --
 uw_cfg_common.permissions.yml               | 4 ----
 3 files changed, 11 deletions(-)

diff --git a/src/Access/UwNodeAccessCheck.php b/src/Access/UwNodeAccessCheck.php
index cc0368d8..21019ee7 100644
--- a/src/Access/UwNodeAccessCheck.php
+++ b/src/Access/UwNodeAccessCheck.php
@@ -55,11 +55,6 @@ 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();
-    }
-
     // Dashboard config: admin/config/dashboards/dashboardssettings.
     if ($route_name === 'dashboards.dashboards_settings_form') {
       return $account->hasPermission('access dashboard config') ? AccessResult::allowed() : AccessResult::forbidden();
diff --git a/src/Routing/UwNodeAccessRouteSubscriber.php b/src/Routing/UwNodeAccessRouteSubscriber.php
index 9fab550c..2036afa7 100644
--- a/src/Routing/UwNodeAccessRouteSubscriber.php
+++ b/src/Routing/UwNodeAccessRouteSubscriber.php
@@ -24,8 +24,6 @@ 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)) {
diff --git a/uw_cfg_common.permissions.yml b/uw_cfg_common.permissions.yml
index 6426bcb6..519d4fda 100644
--- a/uw_cfg_common.permissions.yml
+++ b/uw_cfg_common.permissions.yml
@@ -4,10 +4,6 @@
 'access dashboard config':
   title: 'Access dashboard configuration'
   description: 'Allows access to admin/config/dashboards/dashboardssettings.'
-'administer role expire configuration':
-  title: 'Administer role expire configuration'
-  description: 'Allows access to admin/config/system/role-expire.'
-  restrict access: true
 'access manage toolbar item':
   title: 'Access "Manage" toolbar item'
   description: 'Allows access to the toolbar item "Manage". Without this, "People" and "Reports" will appear under "Workbench" to those who have access.'
-- 
GitLab