Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

User should include realm unique name, not display name

Eric Bariauxc9d533518f9e
diff --git a/manager/shared/src/main/java/org/openremote/manager/shared/security/User.java b/manager/shared/src/main/java/org/openremote/manager/shared/security/User.java
index 471359780..c6faede7f 100644
--- a/manager/shared/src/main/java/org/openremote/manager/shared/security/User.java
+++ b/manager/shared/src/main/java/org/openremote/manager/shared/security/User.java
@@ -38,7 +38,7 @@ import javax.validation.constraints.Size;
@Subselect("select * from USER_ENTITY") // Map this immutable to an SQL view, don't use/create table
public class User {
- @Formula("(select ra.VALUE from REALM_ATTRIBUTE ra where ra.REALM_ID = REALM_ID and ra.name = 'displayName')")
+ @Formula("(select r.NAME from REALM r where r.ID = REALM_ID")
protected String realm;
@Column(name = "REALM_ID")