From fad3222d7e52527c664bd3d54ac93574daffe723 Mon Sep 17 00:00:00 2001 From: Daniil Palagin Date: Wed, 11 Dec 2024 10:07:34 +0100 Subject: [PATCH] [kbss-cvut/record-manager-ui#202] Fix role name in resoleRoles --- .../java/cz/cvut/kbss/study/security/model/UserDetails.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/cz/cvut/kbss/study/security/model/UserDetails.java b/src/main/java/cz/cvut/kbss/study/security/model/UserDetails.java index b02a9f21..f170ac30 100644 --- a/src/main/java/cz/cvut/kbss/study/security/model/UserDetails.java +++ b/src/main/java/cz/cvut/kbss/study/security/model/UserDetails.java @@ -40,7 +40,7 @@ private void resolveRoles() { user.getRoleGroup().getRoles().stream() .map(r -> new SimpleGrantedAuthority(r.getRoleName())) .toList()); - authorities.add(new SimpleGrantedAuthority(Role.user.name())); + authorities.add(new SimpleGrantedAuthority(Role.user.getRoleName())); } public void eraseCredentials() {