Commit 2ed1573f authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

374: Reflect user role in schema editor

Task-Url: https://home.tgradl.de/mantisbt/view.php?id=374
parent befb4cdb
......@@ -9,7 +9,7 @@ public class SimpleUserDetails implements UserDetails, StagedUserDetails {
private Collection<Role> authorities;
private String id;
protected String id;
private String endpointId;
private String endpointName;
private String username;
......@@ -17,6 +17,8 @@ public class SimpleUserDetails implements UserDetails, StagedUserDetails {
private String language;
private boolean hasAllAttributes;
public SimpleUserDetails() {}
public SimpleUserDetails(User user, Collection<Role> authorities) {
this.id = user.getId();
this.username = user.getNameId();
......@@ -28,15 +30,28 @@ public class SimpleUserDetails implements UserDetails, StagedUserDetails {
this.hasAllAttributes = false;
}
public String getId() { return id; }
public boolean isExpired() { return expired; }
public void setId(String id) { this.id = id; }
public String getEndpointId() { return endpointId; }
public void setEndpointId(String endpointId) { this.endpointId = endpointId; }
public String getEndpointName() { return endpointName; }
public String getLanguage() { return this.language; }
public void setEndpointName(String endpointName) { this.endpointName = endpointName; }
public boolean isExpired() { return expired; }
public void setExpired(boolean expired) { this.expired = expired; }
public String getLanguage() { return language; }
public void setLanguage(String language) { this.language = language; }
public boolean isHasAllAttributes() { return hasAllAttributes; }
public void setHasAllAttributes(boolean hasAllAttributes) { this.hasAllAttributes = hasAllAttributes; }
public void setAuthorities(Collection<Role> authorities) { this.authorities = authorities; }
public void setUsername(String username) { this.username = username; }
@Override public String getUsername() { return username; }
@Override public String getPassword() { return ""; }
@Override public Collection<Role> getAuthorities() { return authorities; }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment