Revision 29d21df0
Added by Andreas Müller over 7 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/hibernate/permission/Role.java | ||
---|---|---|
74 | 74 |
@Override |
75 | 75 |
public GrantedAuthorityImpl asNewGrantedAuthority() { |
76 | 76 |
GrantedAuthorityImpl grantedAuthority; |
77 |
grantedAuthority = GrantedAuthorityImpl.NewInstance(); |
|
77 |
grantedAuthority = GrantedAuthorityImpl.NewInstance(null);
|
|
78 | 78 |
grantedAuthority.setUuid(uuid); |
79 | 79 |
grantedAuthority.setAuthority(authority); |
80 | 80 |
return grantedAuthority; |
... | ... | |
85 | 85 |
Assert.isTrue(authorityString.matches("^" + ROLE_PREFIX +"\\w*$"), "invalid role prefix of authority " + authorityString + "[" + grantedAuthority.getUuid() + "]"); |
86 | 86 |
return new Role(grantedAuthority.getUuid(), authorityString); |
87 | 87 |
} |
88 |
|
|
88 |
|
|
89 | 89 |
public static Role fromString(String authorityString){ |
90 | 90 |
Assert.isTrue(authorityString.matches("^" + ROLE_PREFIX +"\\w*$"), "invalid role prefix of authority " + authorityString); |
91 | 91 |
Role role = null; |
Also available in: Unified diff
adapt GrantedAuthorityImpl factory method