Update public.check_jwt (db-pre-request function) to add user.id session variables

This commit is contained in:
xbgmsharp
2023-07-18 18:30:24 +02:00
parent 94960ad391
commit 6b0eb72b82

View File

@@ -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