Skip to content

Commit

Permalink
Script update
Browse files Browse the repository at this point in the history
  • Loading branch information
sebiweise committed Nov 22, 2023
1 parent f3127af commit 1c0b5bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/unsaged/db/GenerationScript.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--- uid() function to be used in RLS policies
CREATE FUNCTION requesting_user_id() RETURNS text
LANGUAGE sql STABLE
AS $$
select
select nullif(current_setting('request.jwt.claims', true)::json->>'sub', '')::text;
-- Create new user_id function
create or replace function requesting_user_id()
returns text
language sql stable
as $$
select nullif(current_setting('request.jwt.claims', true)::json->>'sub', '')::text;
$$;


Expand Down

0 comments on commit 1c0b5bc

Please sign in to comment.