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() {