-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix perms #418
Fix perms #418
Conversation
👷 Deploy request for webcapgo accepted.
|
Kudos, SonarCloud Quality Gate passed! |
@@ -0,0 +1,15 @@ | |||
BEGIN; | |||
ALTER POLICY "allow apikey to select" ON "public"."apps" USING (is_allowed_capgkey(((current_setting('request.headers'::text, true))::json ->> 'capgkey'::text), '{all,write,upload,read}'::key_mode[], app_id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to write this in more than one line? It's pretty hard to read everything in one single line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know, I have copied this code from supabase and have not changed a bit. The truth is that we have even longer lines in base.sql so I would not risk breaking this
ALTER TABLE devices DROP CONSTRAINT devices_version_fkey; | ||
ALTER TABLE stats DROP CONSTRAINT logs_app_id_fkey; | ||
ALTER TABLE stats DROP CONSTRAINT logs_device_id_fkey; | ||
ALTER TABLE stats DROP CONSTRAINT logs_version_fkey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this change take effect? considering this already ran
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Martin broke base.sql and the supabase up
was no longer working (because of the broken base.sql). I fixed the base.sql and then it threw an exception in this migration so I removed the lines that were causing the problems (The problem was that logs_app_id_fkey
constraint did not exist)
ALTER TABLE ONLY "public"."channel_devices" | ||
ADD CONSTRAINT "channel_devices_pkey" PRIMARY KEY ("device_id"); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this change take effect? considering this already ran
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the patience answering the comments.
LGTM
/tip $20 @ologbonowiwi |
/tip $20 @WcaleNieWolny |
@ologbonowiwi: You just got a $20 tip! We'll notify you once it is processed. |
🎉🎈 @WcaleNieWolny has been awarded $20! 🎈🎊 |
🎉🎈 @ologbonowiwi has been awarded $20! 🎈🎊 |
Requires: Cap-go/CLI#175