Remove TODO for future issues
This commit is contained in:
parent
feaf696e72
commit
718ff6b7ab
|
|
@ -4,20 +4,23 @@ namespace App\Policies;
|
|||
|
||||
use App\Models\School;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
use function is_null;
|
||||
|
||||
class SchoolPolicy
|
||||
{
|
||||
// TODO Blanket admin policy is not appropriate for schools as it may break things in the audition process
|
||||
/**
|
||||
* Grant admin users access to all functions
|
||||
*/
|
||||
public function before(User $user, string $ability): bool|null
|
||||
public function before(User $user, string $ability): ?bool
|
||||
{
|
||||
if($user->is_admin) return true;
|
||||
if ($user->is_admin) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue