From 6a50ec20275d80d25979d94810a0ac26c110cce1 Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Tue, 5 Mar 2024 13:18:32 +0100 Subject: [PATCH] Display teams urn if imported --- client/src/utils/UserRole.js | 2 +- server/src/main/java/access/model/Role.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/utils/UserRole.js b/client/src/utils/UserRole.js index 10ca0590..0e5d08e7 100644 --- a/client/src/utils/UserRole.js +++ b/client/src/utils/UserRole.js @@ -97,7 +97,7 @@ export const allowedToRenewUserRole = (user, userRole) => { } } -export const urnFromRole = (groupUrnPrefix, role) => `${groupUrnPrefix}:${role.identifier}:${role.shortName}`; +export const urnFromRole = (groupUrnPrefix, role) => role.teamsOrigin ? role.urn : `${groupUrnPrefix}:${role.identifier}:${role.shortName}`; export const markAndFilterRoles = (user, allRoles, locale, multiple, separator) => { allRoles.forEach(role => { diff --git a/server/src/main/java/access/model/Role.java b/server/src/main/java/access/model/Role.java index d536b01a..5e25d76f 100644 --- a/server/src/main/java/access/model/Role.java +++ b/server/src/main/java/access/model/Role.java @@ -55,7 +55,6 @@ public class Role implements Serializable, Provisionable { @Column(name = "teams_origin") private boolean teamsOrigin; - @Column(name = "identifier") private String identifier;