File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,14 @@ class CeleryConfig:
103
103
"supports_credentials" : True ,
104
104
"allow_headers" : ["*" ],
105
105
"resources" : ["*" ],
106
- "origins" : ["http://northwestern.localhost:3000" ]
106
+ "origins" : ["http://northwestern.localhost:3000" , "*" ]
107
+ }
108
+
109
+ GUEST_ROLE_NAME = 'embed_role'
110
+ GUEST_TOKEN_JWT_EXP_SECONDS = 3600 # 1 hour
111
+ X_FRAME_OPTIONS = 'ALLOWALL'
112
+ CONTENT_SECURITY_POLICY = {
113
+ 'frame-ancestors' : ["'self'" , '*' ]
107
114
}
108
115
109
116
FEATURE_FLAGS = {"ALERT_REPORTS" : True , "EMBEDDED_SUPERSET" : True }
Original file line number Diff line number Diff line change
1
+ -- Enable Row Level Security for all tables in the public schema
2
+ DO $$
3
+ DECLARE
4
+ table_record RECORD;
5
+ BEGIN
6
+ FOR table_record IN
7
+ SELECT tablename
8
+ FROM pg_tables
9
+ WHERE schemaname = ' public'
10
+ LOOP
11
+ BEGIN
12
+ EXECUTE format(' ALTER TABLE %I ENABLE ROW LEVEL SECURITY' , table_record .tablename );
13
+
14
+ -- Create a basic policy that allows access to authenticated users
15
+ EXECUTE format('
16
+ CREATE POLICY "allow_authenticated_users" ON %I
17
+ FOR ALL
18
+ TO authenticated
19
+ USING (true)
20
+ WITH CHECK (true)
21
+ ' , table_record .tablename );
22
+ EXCEPTION
23
+ WHEN duplicate_object THEN
24
+ -- Policy already exists, skip
25
+ NULL ;
26
+ END;
27
+ END LOOP;
28
+ END $$;
You can’t perform that action at this time.
0 commit comments