Skip to content

Commit 3776680

Browse files
Fixed owner-only upload jobs
X-Lovable-Edit-ID: edt-2fffe2a7-037a-4b33-9390-84f5cebee80b Co-authored-by: criptogus <128640021+criptogus@users.noreply.github.com>
2 parents 593873a + d3801f7 commit 3776680

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
DROP POLICY IF EXISTS "no direct select on upload jobs" ON public.package_upload_jobs;
2+
3+
CREATE POLICY "owners can read their own upload jobs"
4+
ON public.package_upload_jobs
5+
FOR SELECT
6+
TO authenticated
7+
USING (user_id = auth.uid());
8+
9+
GRANT SELECT (id, user_id, filename, inferred_type, status, attempts, result, error, package_id, slug, created_at, started_at, finished_at) ON public.package_upload_jobs TO authenticated;
10+
GRANT ALL ON public.package_upload_jobs TO service_role;

0 commit comments

Comments
 (0)