mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
list more infos in admin panel
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.commafeed.frontend.model;
|
package com.commafeed.frontend.model;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAccessType;
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
import javax.xml.bind.annotation.XmlAccessorType;
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
@@ -33,6 +34,12 @@ public class UserModel implements Serializable {
|
|||||||
@ApiProperty(value = "account status")
|
@ApiProperty(value = "account status")
|
||||||
private boolean enabled;
|
private boolean enabled;
|
||||||
|
|
||||||
|
@ApiProperty(value = "account creation date")
|
||||||
|
private Date created;
|
||||||
|
|
||||||
|
@ApiProperty(value = "last login date")
|
||||||
|
private Date lastLogin;
|
||||||
|
|
||||||
@ApiProperty(value = "user is admin")
|
@ApiProperty(value = "user is admin")
|
||||||
private boolean admin;
|
private boolean admin;
|
||||||
|
|
||||||
@@ -92,4 +99,20 @@ public class UserModel implements Serializable {
|
|||||||
this.apiKey = apiKey;
|
this.apiKey = apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Date getCreated() {
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreated(Date created) {
|
||||||
|
this.created = created;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getLastLogin() {
|
||||||
|
return lastLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLastLogin(Date lastLogin) {
|
||||||
|
this.lastLogin = lastLogin;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ public class AdminREST extends AbstractResourceREST {
|
|||||||
userModel.setName(user.getName());
|
userModel.setName(user.getName());
|
||||||
userModel.setEmail(user.getEmail());
|
userModel.setEmail(user.getEmail());
|
||||||
userModel.setEnabled(!user.isDisabled());
|
userModel.setEnabled(!user.isDisabled());
|
||||||
|
userModel.setCreated(user.getCreated());
|
||||||
|
userModel.setLastLogin(user.getLastLogin());
|
||||||
users.put(key, userModel);
|
users.put(key, userModel);
|
||||||
}
|
}
|
||||||
if (role.getRole() == Role.ADMIN) {
|
if (role.getRole() == Role.ADMIN) {
|
||||||
|
|||||||
Reference in New Issue
Block a user