1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?php namespace JsonApi\Routes\Institutes; use Institute; use User; class Authority { /** * @SuppressWarnings(PHPMD.Superglobals) */ public static function canEditInstitute(User $user, Institute $institute) { return $GLOBALS['perm']->have_studip_perm('admin', $institute->id, $user->id); } }