diff --git a/lbplanner/classes/enums/CAPABILITY.php b/lbplanner/classes/enums/CAPABILITY.php index cf37d86c..ba345321 100644 --- a/lbplanner/classes/enums/CAPABILITY.php +++ b/lbplanner/classes/enums/CAPABILITY.php @@ -34,16 +34,6 @@ * Capabilities a user can have */ class CAPABILITY extends Enum { - /** - * Shortname of the admin CAPABILITY. - */ - const ADMIN = 'local/lb_planner:admin'; - - /** - * Shortname of the manager CAPABILITY. - */ - const MANAGER = 'local/lb_planner:manager'; - /** * Shortname of the teacher CAPABILITY. */ diff --git a/lbplanner/classes/enums/CAPABILITY_FLAG.php b/lbplanner/classes/enums/CAPABILITY_FLAG.php index 5728405d..73ca0583 100644 --- a/lbplanner/classes/enums/CAPABILITY_FLAG.php +++ b/lbplanner/classes/enums/CAPABILITY_FLAG.php @@ -34,16 +34,6 @@ * Bitmappable flags for capabilities a user can have */ class CAPABILITY_FLAG extends Enum { - /** - * Flag of the admin CAPABILITY. - */ - const ADMIN = 1; - - /** - * Flag of the manager CAPABILITY. - */ - const MANAGER = 2; - /** * Flag of the teacher CAPABILITY. */ diff --git a/lbplanner/classes/helpers/slot_helper.php b/lbplanner/classes/helpers/slot_helper.php index 980da3e5..75b60afe 100644 --- a/lbplanner/classes/helpers/slot_helper.php +++ b/lbplanner/classes/helpers/slot_helper.php @@ -387,8 +387,7 @@ public static function check_slot_supervisor(int $supervisorid, int $slotid): bo $context = context_system::instance(); if ( - has_capability(CAPABILITY::ADMIN, $context, $supervisorid) - || has_capability(CAPABILITY::SLOTMASTER, $context, $supervisorid) + has_capability(CAPABILITY::SLOTMASTER, $context, $supervisorid) ) { return true; } diff --git a/lbplanner/db/access.php b/lbplanner/db/access.php index c0fa9e87..34eded1c 100644 --- a/lbplanner/db/access.php +++ b/lbplanner/db/access.php @@ -36,19 +36,18 @@ 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, ], - 'local/lb_planner:admin' => [ + 'local/lb_planner:slotmaster' => [ 'riskbitmask' => RISK_SPAM || RISK_PERSONAL, 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, ], - 'local/lb_planner:manager' => [ - 'riskbitmask' => RISK_SPAM || RISK_PERSONAL, - 'captype' => 'write', - 'contextlevel' => CONTEXT_SYSTEM, +]; + +$deprecatedcapabilities = [ + 'local/lb_planner:admin' => [ + 'message' => 'this capability was removed because of internal changes making it unnecessary', ], - 'local/lb_planner:slotmaster' => [ - 'riskbitmask' => RISK_SPAM || RISK_PERSONAL, - 'captype' => 'write', - 'contextlevel' => CONTEXT_SYSTEM, + 'local/lb_planner:manager' => [ + 'message' => 'this capability was removed because of internal changes making it unnecessary', ], ];