X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FPolicies%2FProtocolPolicy.php;fp=app%2FPolicies%2FProtocolPolicy.php;h=186fe09f7bb9fc3f546aadaf42270f9781ad192f;hb=55f2d7cd6c290a0d26db177d54d20c393f890bbb;hp=0000000000000000000000000000000000000000;hpb=f642f1eda2a68ad5e09b71ccdae1499bc9d31e4f;p=alttp.git diff --git a/app/Policies/ProtocolPolicy.php b/app/Policies/ProtocolPolicy.php new file mode 100644 index 0000000..186fe09 --- /dev/null +++ b/app/Policies/ProtocolPolicy.php @@ -0,0 +1,94 @@ +role === 'admin'; + } + + /** + * Determine whether the user can view the model. + * + * @param \App\Models\User $user + * @param \App\Models\Protocol $protocol + * @return \Illuminate\Auth\Access\Response|bool + */ + public function view(User $user, Protocol $protocol) + { + return $user->role === 'admin'; + } + + /** + * Determine whether the user can create models. + * + * @param \App\Models\User $user + * @return \Illuminate\Auth\Access\Response|bool + */ + public function create(User $user) + { + return false; + } + + /** + * Determine whether the user can update the model. + * + * @param \App\Models\User $user + * @param \App\Models\Protocol $protocol + * @return \Illuminate\Auth\Access\Response|bool + */ + public function update(User $user, Protocol $protocol) + { + return false; + } + + /** + * Determine whether the user can delete the model. + * + * @param \App\Models\User $user + * @param \App\Models\Protocol $protocol + * @return \Illuminate\Auth\Access\Response|bool + */ + public function delete(User $user, Protocol $protocol) + { + return false; + } + + /** + * Determine whether the user can restore the model. + * + * @param \App\Models\User $user + * @param \App\Models\Protocol $protocol + * @return \Illuminate\Auth\Access\Response|bool + */ + public function restore(User $user, Protocol $protocol) + { + return false; + } + + /** + * Determine whether the user can permanently delete the model. + * + * @param \App\Models\User $user + * @param \App\Models\Protocol $protocol + * @return \Illuminate\Auth\Access\Response|bool + */ + public function forceDelete(User $user, Protocol $protocol) + { + return false; + } +}