acc_invoices: роль admin и переключатель роли CFO/accountant/employee; Keycloak: фирменный стиль KH Build
All checks were successful
ci / test (push) Successful in 55s
ci / deploy (push) Successful in 3m13s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-04 14:36:45 +03:00
parent d79ebfda10
commit b878aa72bb
9 changed files with 126 additions and 15 deletions

View File

@@ -0,0 +1,6 @@
-- acc_invoices: роль admin (отладка и тестирование: может переключаться между CFO, accountant и employee)
alter table user_roles drop constraint if exists user_roles_role_check;
alter table user_roles add constraint user_roles_role_check check (role in ('accountant', 'cfo', 'admin'));
insert into user_roles (person_id, role)
select id, 'admin' from person where lower(email) in ('yuri@khbuild.pro', 'dmitry@khbuild.pro')
on conflict do nothing;