From 719f50c778d079cdd739cb216ce3cf3b10654c88 Mon Sep 17 00:00:00 2001 From: felmer <franz-josef.elmer@id.ethz.ch> Date: Thu, 2 Feb 2023 07:13:36 +0100 Subject: [PATCH] SSDM-13279: bug fixed: now user ids with '-' are extracted correctly from session token --- .../core-plugins/eln-lims/1/as/services/freeze-api/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/freeze-api/script.py b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/freeze-api/script.py index 17d9e84b566..f8eb9b6b873 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/freeze-api/script.py +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/services/freeze-api/script.py @@ -60,7 +60,7 @@ def process(context, parameters): spaceCode = getSpace(entity); # 2. Verify that the user is an admin in such space - userId = sessionToken.split("-")[0]; + userId = "-".join(sessionToken.split("-")[:-1]) isAdminOfSpace = isUserAdminOnSpace(context.applicationService, sessionToken, userId, spaceCode); if not isAdminOfSpace: raise AuthorizationFailureException("The user is not enough rights to freeze.") -- GitLab