mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-04-01 18:00:12 +02:00
improve authentication system
This commit is contained in:
@@ -59,7 +59,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(propOrder =
|
||||
{
|
||||
"name", "displayName", "mail", "password", "admin", "type"
|
||||
"name", "displayName", "mail", "password", "admin", "type", "lastLogin"
|
||||
})
|
||||
public class User
|
||||
implements TypedObject, Principal, Cloneable, Validateable, Serializable
|
||||
@@ -237,6 +237,17 @@ public class User
|
||||
return displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public long getLastLogin()
|
||||
{
|
||||
return lastLogin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -332,6 +343,17 @@ public class User
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param lastLogin
|
||||
*/
|
||||
public void setLastLogin(long lastLogin)
|
||||
{
|
||||
this.lastLogin = lastLogin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -385,6 +407,9 @@ public class User
|
||||
/** Field description */
|
||||
private String displayName;
|
||||
|
||||
/** Field description */
|
||||
private long lastLogin;
|
||||
|
||||
/** Field description */
|
||||
private String mail;
|
||||
|
||||
|
||||
@@ -43,4 +43,16 @@ import sonia.scm.Manager;
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public interface UserManager
|
||||
extends Manager<User, UserException>, ListenerSupport<UserListener> {}
|
||||
extends Manager<User, UserException>, ListenerSupport<UserListener>
|
||||
{
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean contains(String username);
|
||||
}
|
||||
|
||||
@@ -115,6 +115,20 @@ public class XmlUserManager extends AbstractUserManager
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param username
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean contains(String username)
|
||||
{
|
||||
return userDB.contains(username);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user