feat(policies): add CommentPolicy, update? and LikePolicy

This commit is contained in:
dualfroz committed 2026-09-04 18:23:56 +02:00
1 parent 5025bb8d9c
commit 4160704b23
3 files changed
+43

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
class PostPolicy < Prism::Policy
def update?
user && record.user_id == user.id
end
def destroy?
update?
end
def restore?
update?
end
end