X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FPolicies%2FTournamentPolicy.php;fp=app%2FPolicies%2FTournamentPolicy.php;h=fd2a781e87db325e2322e517f7b1442dde0a55f8;hb=c30ac282dde3d746d6a7762ee18c70b4416500b5;hp=6352d714cba1fc7f174a8d56204ca64e6791e009;hpb=4388278823ac8a791641ac1d65fc675e9543b8e8;p=alttp.git diff --git a/app/Policies/TournamentPolicy.php b/app/Policies/TournamentPolicy.php index 6352d71..fd2a781 100644 --- a/app/Policies/TournamentPolicy.php +++ b/app/Policies/TournamentPolicy.php @@ -104,4 +104,16 @@ class TournamentPolicy return $user->role === 'admin' || $user->isParticipant($tournament); } + /** + * Determine whether the user can view the tournament protocol. + * + * @param \App\Models\User $user + * @param \App\Models\Tournament $tournament + * @return \Illuminate\Auth\Access\Response|bool + */ + public function viewProtocol(User $user, Tournament $tournament) + { + return $user->role === 'admin'; + } + }