add versionNo
This commit is contained in:
parent
51c559d661
commit
72fec4201f
5 changed files with 27 additions and 2 deletions
|
@ -57,7 +57,7 @@ public class UserService implements Serializable {
|
|||
|
||||
return userList;
|
||||
}
|
||||
|
||||
|
||||
public OptionalEntity<User> getUser(final String id) {
|
||||
return userBhv.selectByPK(id);
|
||||
}
|
||||
|
|
|
@ -384,7 +384,8 @@ public class AdminUserAction extends FessAdminAction {
|
|||
}, toEditHtml());
|
||||
}
|
||||
}
|
||||
protected void verifyPassword(final CreateForm form) {
|
||||
|
||||
protected void verifyPassword(final CreateForm form) {
|
||||
if (form.crudMode == CrudMode.CREATE && StringUtil.isBlank(form.password)) {
|
||||
throwValidationError(messages -> {
|
||||
messages.addErrorsBlankPassword(GLOBAL);
|
||||
|
|
|
@ -8,4 +8,12 @@ import org.codelibs.fess.es.bsentity.BsGroup;
|
|||
public class Group extends BsGroup {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getVersionNo() {
|
||||
return asDocMeta().version();
|
||||
}
|
||||
|
||||
public void setVersionNo(final Long version) {
|
||||
asDocMeta().version(version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,4 +8,12 @@ import org.codelibs.fess.es.bsentity.BsRole;
|
|||
public class Role extends BsRole {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getVersionNo() {
|
||||
return asDocMeta().version();
|
||||
}
|
||||
|
||||
public void setVersionNo(final Long version) {
|
||||
asDocMeta().version(version);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,14 @@ public class User extends BsUser {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Long getVersionNo() {
|
||||
return asDocMeta().version();
|
||||
}
|
||||
|
||||
public void setVersionNo(final Long version) {
|
||||
asDocMeta().version(version);
|
||||
}
|
||||
|
||||
public String[] getRoleNames() {
|
||||
return Stream.of(getRoles()).map(role -> new String(Base64.getDecoder().decode(role), Constants.CHARSET_UTF_8))
|
||||
.toArray(n -> new String[n]);
|
||||
|
|
Loading…
Add table
Reference in a new issue