no delete for moderators

also add update
This commit is contained in:
IsWaffle 2024-10-08 09:32:49 -04:00
parent d2de62a7d3
commit fa97936ddb

View File

@ -37,7 +37,7 @@ class ModPolicy
*/
public function update(User $user, Mod $mod): bool
{
return false;
return $user->isMod() || $user->isAdmin() || $mod->users->contains($user);
}
/**
@ -48,7 +48,7 @@ class ModPolicy
// I'm guessing we want the mod author to also be able to do this?
// what if there are multiple authors?
// I'm leaving that out for now -waffle.lazy
return $user->isMod() || $user->isAdmin();
return $user->isAdmin();
}
/**