Save workspace changes

This commit is contained in:
2026-04-18 17:02:56 +02:00
parent f02ea9a711
commit 87d60af5a9
4220 changed files with 1388603 additions and 1554 deletions

View File

@@ -13,9 +13,8 @@ final class EnsureAdminOrModerator
public function handle(Request $request, Closure $next): Response
{
$user = $request->user();
$role = strtolower((string) ($user->role ?? ''));
if (! in_array($role, ['admin', 'moderator'], true)) {
if (! $user || (! $user->isAdmin() && ! $user->isModerator())) {
abort(Response::HTTP_FORBIDDEN, 'Forbidden.');
}