From 3dfacb47bf83040cda7a70ff9cecb276fbaacd23 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 4 Jul 2024 14:59:06 +0200 Subject: [PATCH] fix(DB): permissions changes fix(chalice): permissions changes --- ee/api/schemas/schemas_ee.py | 2 +- ee/scripts/schema/db/init_dbs/postgresql/1.18.0/1.18.0.sql | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ee/api/schemas/schemas_ee.py b/ee/api/schemas/schemas_ee.py index 2c1f49a36..31b7f06ac 100644 --- a/ee/api/schemas/schemas_ee.py +++ b/ee/api/schemas/schemas_ee.py @@ -34,7 +34,7 @@ class CurrentContext(schemas.CurrentContext): if values.get("permissions") is not None: perms = [] for p in values["permissions"]: - if Permissions.has_value(p): + if Permissions.has_value(p) or ServicePermissions.has_value(p): perms.append(p) values["permissions"] = perms return values diff --git a/ee/scripts/schema/db/init_dbs/postgresql/1.18.0/1.18.0.sql b/ee/scripts/schema/db/init_dbs/postgresql/1.18.0/1.18.0.sql index bc9baeff1..769c53e2d 100644 --- a/ee/scripts/schema/db/init_dbs/postgresql/1.18.0/1.18.0.sql +++ b/ee/scripts/schema/db/init_dbs/postgresql/1.18.0/1.18.0.sql @@ -33,6 +33,10 @@ UPDATE public.roles SET permissions='{SERVICE_SESSION_REPLAY,SERVICE_DEV_TOOLS,SERVICE_ASSIST_LIVE,SERVICE_ASSIST_CALL}' WHERE service_role; +UPDATE public.users +SET weekly_report= FALSE +WHERE service_account; + COMMIT; \elif :is_next