Skip to content

Commit

Permalink
Merge pull request #32 from recogito/develop
Browse files Browse the repository at this point in the history
Merge Develop to Main
  • Loading branch information
lwjameson authored Jul 24, 2024
2 parents 7dc13fe + e36c7ec commit 5e4c075
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SQL Scripts/policies/layer_contexts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CREATE POLICY "Users with correct policies can SELECT on layer_contexts" ON publ
is_archived IS FALSE AND (
public.check_action_policy_organization(auth.uid(), 'layer_contexts', 'SELECT') OR
public.check_action_policy_project_from_context(auth.uid(), 'layer_contexts', 'SELECT', context_id) OR
public.check_action_policy_layer(auth.uid(), 'layer_contexts', 'SELECT', layer_id)
public.check_action_policy_layer_select(auth.uid(), 'layer_contexts', layer_id)
)
);

Expand Down
11 changes: 11 additions & 0 deletions supabase/migrations/20240711184827_fixing_read_only_base_layer.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
drop policy "Users with correct policies can SELECT on layer_contexts" on "public"."layer_contexts";

create policy "Users with correct policies can SELECT on layer_contexts"
on "public"."layer_contexts"
as permissive
for select
to authenticated
using (((is_archived IS FALSE) AND (check_action_policy_organization(auth.uid(), 'layer_contexts'::character varying, 'SELECT'::operation_types) OR check_action_policy_project_from_context(auth.uid(), 'layer_contexts'::character varying, 'SELECT'::operation_types, context_id) OR check_action_policy_layer_select(auth.uid(), 'layer_contexts'::character varying, layer_id))));



17 changes: 17 additions & 0 deletions test-email-signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const Supa = require('@supabase/supabase-js');

const EMAIL = '[email protected]';

const main = async () => {
const supabase = await Supa.createClient(process.env.SUPABASE_TEST_HOST, process.env.SUPABASE_TEST_SERVICE_KEY);

const inviteResp = await supabase.auth.admin.inviteUserByEmail(EMAIL);

if (inviteResp.error) {
console.log('Failed to invite user ', EMAIL);
} else {
console.log('Success!!');
}
}

main();

0 comments on commit 5e4c075

Please sign in to comment.