mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 11:17:46 +00:00
Update public.check_jwt (db-pre-request function) to add user.id
session variables
This commit is contained in:
@@ -1107,6 +1107,8 @@ BEGIN
|
|||||||
RAISE EXCEPTION 'Invalid user'
|
RAISE EXCEPTION 'Invalid user'
|
||||||
USING HINT = 'Unknow user or password';
|
USING HINT = 'Unknow user or password';
|
||||||
END IF;
|
END IF;
|
||||||
|
-- Set session variables
|
||||||
|
PERFORM set_config('user.id', account_rec.user_id, false);
|
||||||
--RAISE WARNING 'req path %', current_setting('request.path', true);
|
--RAISE WARNING 'req path %', current_setting('request.path', true);
|
||||||
-- Function allow without defined vessel
|
-- Function allow without defined vessel
|
||||||
-- openapi doc, user settings, otp code and vessel registration
|
-- openapi doc, user settings, otp code and vessel registration
|
||||||
|
Reference in New Issue
Block a user