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

@@ -0,0 +1,25 @@
<?php
namespace App\Policies;
use App\Models\ArtworkComment;
use App\Models\User;
class ArtworkCommentPolicy
{
/**
* Users can update their own comments.
*/
public function update(User $user, ArtworkComment $comment): bool
{
return $user->id === (int) $comment->user_id;
}
/**
* Users can delete their own comments; admins can delete any comment.
*/
public function delete(User $user, ArtworkComment $comment): bool
{
return $user->id === (int) $comment->user_id || $user->is_admin;
}
}