Merge pull request #466 from tnfssc/feat/admin-view-access

This commit is contained in:
Sharath 2025-05-23 19:15:39 +05:30 committed by GitHub
commit 730f481f58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
DROP POLICY IF EXISTS "Give read only access to internal users" ON threads;
CREATE POLICY "Give read only access to internal users" ON threads
FOR SELECT
USING (
((auth.jwt() ->> 'email'::text) ~~ '%@kortix.ai'::text)
);
DROP POLICY IF EXISTS "Give read only access to internal users" ON messages;
CREATE POLICY "Give read only access to internal users" ON messages
FOR SELECT
USING (
((auth.jwt() ->> 'email'::text) ~~ '%@kortix.ai'::text)
);
DROP POLICY IF EXISTS "Give read only access to internal users" ON projects;
CREATE POLICY "Give read only access to internal users" ON projects
FOR SELECT
USING (
((auth.jwt() ->> 'email'::text) ~~ '%@kortix.ai'::text)
);