fix web authentication action
This commit is contained in:
parent
6b25420efc
commit
dea0d21679
2 changed files with 7 additions and 6 deletions
|
@ -140,6 +140,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
|
||||
@Execute(token = TxToken.SAVE)
|
||||
public HtmlResponse editpage(final int crudMode, final String id) {
|
||||
verifyCrudMode(crudMode, CrudMode.EDIT);
|
||||
return asHtml(path_AdminWebauthentication_EditJsp).useForm(EditForm.class, op -> {
|
||||
op.setup(form -> {
|
||||
webAuthenticationService.getWebAuthentication(id).ifPresent(entity -> {
|
||||
|
@ -181,7 +182,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse editfromconfirm(final EditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CrudMode.EDIT;
|
||||
String id = form.id;
|
||||
final String id = form.id;
|
||||
webAuthenticationService.getWebAuthentication(id).ifPresent(entity -> {
|
||||
copyBeanToBean(entity, form, op -> {});
|
||||
}).orElse(() -> {
|
||||
|
@ -217,7 +218,7 @@ public class AdminWebauthenticationAction extends FessAdminAction {
|
|||
public HtmlResponse deletefromconfirm(final EditForm form) {
|
||||
validate(form, messages -> {}, toEditHtml());
|
||||
form.crudMode = CrudMode.DELETE;
|
||||
String id = form.id;
|
||||
final String id = form.id;
|
||||
webAuthenticationService.getWebAuthentication(id).ifPresent(entity -> {
|
||||
copyBeanToBean(entity, form, op -> {});
|
||||
}).orElse(() -> {
|
||||
|
|
|
@ -34,14 +34,14 @@ public class CreateForm implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public int crudMode;
|
||||
public Integer crudMode;
|
||||
|
||||
@Size(max = 100)
|
||||
public String hostname;
|
||||
|
||||
@Min(value = 0)
|
||||
@Max(value = 2147483647)
|
||||
public String port;
|
||||
public Integer port;
|
||||
|
||||
@Size(max = 100)
|
||||
public String authRealm;
|
||||
|
@ -64,7 +64,7 @@ public class CreateForm implements Serializable {
|
|||
public String webConfigId;
|
||||
|
||||
@Required
|
||||
@Size(max = 255)
|
||||
@Size(max = 1000)
|
||||
public String createdBy;
|
||||
|
||||
@Required
|
||||
|
@ -72,7 +72,7 @@ public class CreateForm implements Serializable {
|
|||
|
||||
public void initialize() {
|
||||
crudMode = CrudMode.CREATE;
|
||||
createdBy = "system";
|
||||
createdBy = ComponentUtil.getSystemHelper().getUsername();
|
||||
createdTime = ComponentUtil.getSystemHelper().getCurrentTimeAsLong();
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue