fix(uba,ubcli,ub): MT environments - system users
All changes in this MR are related to correct functioning of multi-tenant environments. All the changes are made in a way to preserve behavior for regular environments "as is" to minimize impact/risks/
The following changes are made:
-
ubcli, when generates RLS for PostgreSQL (basic underlying mechanism of multi-tenant mode) now support 2 new policies:-
tenantAndSpecialUsers- to be used byuba_user -
tenantAndCommonAndSpecialUsers- to be used byuba_subject
-
-
uba_usernow has validation rules that disallow update operation onrootandanonymousin user tenants -
uba_commonmodule now in theisSuperUserfunction, in user tenants check is done against user name, not user ID for "admin" user -
Session.runAsAdminfunction now for user tenants, redirects toSession.runAsUserwith ID of the admin user in that tenant
Edited by Andrii Bezuglyi