Commit befb4cdb 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 9264aa87
......@@ -9,7 +9,7 @@ public class SimpleUserDetails implements UserDetails, StagedUserDetails {
private Collection<Role> authorities;
private int id;
private String id;
private String endpointId;
private String endpointName;
private String username;
......@@ -28,7 +28,7 @@ public class SimpleUserDetails implements UserDetails, StagedUserDetails {
this.hasAllAttributes = false;
}
public int getId() { return id; }
public String getId() { return id; }
public boolean isExpired() { return expired; }
public String getEndpointId() { return endpointId; }
public String getEndpointName() { return endpointName; }
......
......@@ -2,7 +2,7 @@ package de.dariah.aai.javasp.base;
public interface User {
public int getId();
public String getId();
public String getNameId();
public boolean isExpired();
......
......@@ -4,7 +4,7 @@ import java.util.List;
public class AuthPojo {
private boolean auth;
private int userId;
private String userId;
private int level;
private String displayName;
private String language;
......@@ -13,8 +13,8 @@ public class AuthPojo {
public boolean isAuth() { return auth; }
public void setAuth(boolean auth) { this.auth = auth; }
public int getUserId() { return userId; }
public void setUserId(int userId) { this.userId = userId; }
public String getUserId() { return userId; }
public void setUserId(String userId) { this.userId = userId; }
public int getLevel() { return level; }
public void setLevel(int level) { this.level = level; }
......
......@@ -17,12 +17,12 @@ public class AuthInfoHelper {
return this.getCurrentUserDetails(request);
}
public int getUserId(HttpServletRequest request) {
public String getUserId(HttpServletRequest request) {
AuthPojo user = getCurrentUserDetails(request);
if (user!=null) {
return user.getUserId();
} else {
return -1;
return "";
}
}
......
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