Allow hack tags to be reordered

This commit is contained in:
Jared Schoeny
2025-11-28 20:24:58 -10:00
parent b8cefaa3d3
commit 970491cb85
10 changed files with 293 additions and 39 deletions

View File

@@ -0,0 +1,10 @@
create policy "Owners can update tags on own hacks."
on "public"."hack_tags"
as PERMISSIVE
for UPDATE
to public
using (
(is_admin() OR (EXISTS ( SELECT 1
FROM hacks h
WHERE ((h.slug = hack_tags.hack_slug) AND (h.created_by = auth.uid())))))
);