Skip to content

Commit

Permalink
feat: removed unnecessary admin and manager capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
RiedleroD committed Jan 5, 2025
1 parent cc7e2cb commit 654c21d
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
10 changes: 0 additions & 10 deletions lbplanner/classes/enums/CAPABILITY.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
10 changes: 0 additions & 10 deletions lbplanner/classes/enums/CAPABILITY_FLAG.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
3 changes: 1 addition & 2 deletions lbplanner/classes/helpers/slot_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 654c21d

Please sign in to comment.