NIHVIVO-2279 Remove securityLevel from LoginStatusBean
This commit is contained in:
parent
63078edb62
commit
ccb6cc549d
5 changed files with 92 additions and 115 deletions
|
@ -20,27 +20,9 @@ import edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory;
|
|||
public class LoginStatusBean {
|
||||
private static final Log log = LogFactory.getLog(LoginStatusBean.class);
|
||||
|
||||
/**
|
||||
* Security level when the user has not logged in. Also used as a minimum
|
||||
* level when we want to include every user, logged in or not.
|
||||
*/
|
||||
public static final int ANYBODY = 0;
|
||||
|
||||
/** Security level when a user with no privileges is logged in. */
|
||||
public static final int NON_EDITOR = 1;
|
||||
|
||||
/** Security level when an authorized editor is logged in. */
|
||||
public static final int EDITOR = 4;
|
||||
|
||||
/** Security level when an authorized curator is logged in. */
|
||||
public static final int CURATOR = 5;
|
||||
|
||||
/** Security level when a system administrator is logged in. */
|
||||
public static final int DBA = 50;
|
||||
|
||||
/** A bean to return when the user has not logged in. */
|
||||
private static final LoginStatusBean DUMMY_BEAN = new LoginStatusBean("",
|
||||
"", ANYBODY, AuthenticationSource.UNKNOWN);
|
||||
"", AuthenticationSource.UNKNOWN);
|
||||
|
||||
/** The bean is attached to the session by this name. */
|
||||
private static final String ATTRIBUTE_NAME = "loginStatus";
|
||||
|
@ -137,14 +119,12 @@ public class LoginStatusBean {
|
|||
|
||||
private final String userURI;
|
||||
private final String username;
|
||||
private final int securityLevel;
|
||||
private final AuthenticationSource authenticationSource;
|
||||
|
||||
public LoginStatusBean(String userURI, String username, int securityLevel,
|
||||
public LoginStatusBean(String userURI, String username,
|
||||
AuthenticationSource authenticationSource) {
|
||||
this.userURI = userURI;
|
||||
this.username = username;
|
||||
this.securityLevel = securityLevel;
|
||||
this.authenticationSource = authenticationSource;
|
||||
}
|
||||
|
||||
|
@ -156,10 +136,6 @@ public class LoginStatusBean {
|
|||
return username;
|
||||
}
|
||||
|
||||
public int getSecurityLevel() {
|
||||
return securityLevel;
|
||||
}
|
||||
|
||||
public AuthenticationSource getAuthenticationSource() {
|
||||
return authenticationSource;
|
||||
}
|
||||
|
@ -175,7 +151,6 @@ public class LoginStatusBean {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "LoginStatusBean[userURI=" + userURI + ", username=" + username
|
||||
+ ", securityLevel=" + securityLevel
|
||||
+ ", authenticationSource=" + authenticationSource + "]";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue