Logo
Explore Help
Sign In
tandem/campingmontagut
tandem/campingmontagut
2
0
Fork 0
You've already forked campingmontagut
Code Issues Pull Requests Packages Projects Releases Wiki Activity
campingmontagut/revert/set_cookie.sql

8 lines
109 B
MySQL
Raw Normal View History

Add authentication relations, views, and functions for PostgreSQL Most of them are exactly the same as we use for Numerus, but with the main application schema changed to camper. Closes #1
2023-07-22 01:59:12 +02:00
-- Revert camper:set_cookie from pg
begin;
Move the user role down to company_user relation I was starting to add the public page for campsite types, creating more granular row-level security policies for select, insert, update, and delete, because now the guest users needed to SELECT them and they have no related company to filter the rows with. Suddenly, i realized that the role was wrong in the user relation: a user can be an admin to one company, and employee to another, and guess to yet another company; the role should be in the company_user relation instead. That means that to know the role to set to, the user alone is not enough and have to know the company as well. Had to change all the cookie-related function to accept also the company’s host name, as this is the information that the Go application has.
2023-08-08 02:22:16 +02:00
drop function if exists public.set_cookie(text, text);
Add authentication relations, views, and functions for PostgreSQL Most of them are exactly the same as we use for Numerus, but with the main application schema changed to camper. Closes #1
2023-07-22 01:59:12 +02:00
commit;
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 45ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API