Skip to content

Commit

Permalink
Policy
Browse files Browse the repository at this point in the history
  • Loading branch information
CalumTowers committed Jan 7, 2025
1 parent b8214c6 commit 91a1016
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions app/Policies/RosterUpdatePolicy.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?php

namespace App\Policies;

use App\Models\Mship\Account;
use App\Models\RosterUpdate;
use Illuminate\Auth\Access\Response;

class RosterUpdatePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(Account $account): bool
{
return $account->can('roster.manage');
}

/**
* Determine whether the user can view the model.
*/
public function view(Account $account, RosterUpdate $rosterUpdate): bool
{
return $account->can('roster.manage');
}

/**
* Determine whether the user can create models.
*/
public function create(Account $account): bool
{
return false;
}

/**
* Determine whether the user can update the model.
*/
public function update(Account $account, RosterUpdate $rosterUpdate): bool
{
return false;
}

/**
* Determine whether the user can delete the model.
*/
public function delete(Account $account, RosterUpdate $rosterUpdate): bool
{
return false;
}

/**
* Determine whether the user can restore the model.
*/
public function restore(Account $account, RosterUpdate $rosterUpdate): bool
{
return false;
}

/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(Account $account, RosterUpdate $rosterUpdate): bool
{
return false;
}
}

0 comments on commit 91a1016

Please sign in to comment.