SEBSERV-335 finished up and code cleanup
This commit is contained in:
parent
4a8a2adc8f
commit
6a7d565e88
3 changed files with 22 additions and 13 deletions
|
@ -84,18 +84,23 @@ public class AddSecurityKeyGrantPopup {
|
||||||
action.pageContext().getParent().getShell(),
|
action.pageContext().getParent().getShell(),
|
||||||
this.pageService.getWidgetFactory());
|
this.pageService.getWidgetFactory());
|
||||||
dialog.setDialogWidth(800);
|
dialog.setDialogWidth(800);
|
||||||
//dialog.setDialogHeight(600);
|
|
||||||
|
|
||||||
final Predicate<FormHandle<?>> applyGrant = formHandle -> applyGrant(
|
final Predicate<FormHandle<?>> applyGrant = formHandle -> applyGrant(
|
||||||
pageContext,
|
pageContext,
|
||||||
formHandle,
|
formHandle,
|
||||||
appSignatureKeyInfo);
|
appSignatureKeyInfo);
|
||||||
|
|
||||||
dialog.open(
|
if (appSignatureKeyInfo.key == null) {
|
||||||
TITLE_TEXT_KEY,
|
dialog.open(
|
||||||
applyGrant,
|
TITLE_TEXT_KEY,
|
||||||
Utils.EMPTY_EXECUTION,
|
popupComposer);
|
||||||
popupComposer);
|
} else {
|
||||||
|
dialog.open(
|
||||||
|
TITLE_TEXT_KEY,
|
||||||
|
applyGrant,
|
||||||
|
Utils.EMPTY_EXECUTION,
|
||||||
|
popupComposer);
|
||||||
|
}
|
||||||
|
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
action.pageContext().notifyUnexpectedError(e);
|
action.pageContext().notifyUnexpectedError(e);
|
||||||
|
@ -123,20 +128,23 @@ public class AddSecurityKeyGrantPopup {
|
||||||
public Supplier<FormHandle<?>> compose(final Composite parent) {
|
public Supplier<FormHandle<?>> compose(final Composite parent) {
|
||||||
final WidgetFactory widgetFactory = this.pageService.getWidgetFactory();
|
final WidgetFactory widgetFactory = this.pageService.getWidgetFactory();
|
||||||
widgetFactory.addFormSubContextHeader(parent, TITLE_TEXT_INFO, null);
|
widgetFactory.addFormSubContextHeader(parent, TITLE_TEXT_INFO, null);
|
||||||
|
final boolean hasASK = this.appSignatureKeyInfo.key != null;
|
||||||
final PageContext formContext = this.pageContext.copyOf(parent);
|
final PageContext formContext = this.pageContext.copyOf(parent);
|
||||||
final FormHandle<?> form = this.pageService.formBuilder(formContext)
|
final FormHandle<?> form = this.pageService.formBuilder(formContext)
|
||||||
|
|
||||||
.addField(FormBuilder.text(
|
.addField(FormBuilder.text(
|
||||||
Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_KEY_VALUE,
|
Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_KEY_VALUE,
|
||||||
TITLE_TEXT_FORM_SIGNATURE,
|
TITLE_TEXT_FORM_SIGNATURE,
|
||||||
String.valueOf(this.appSignatureKeyInfo.key))
|
(hasASK)
|
||||||
|
? String.valueOf(this.appSignatureKeyInfo.key)
|
||||||
|
: Constants.EMPTY_NOTE)
|
||||||
.readonly(true))
|
.readonly(true))
|
||||||
|
|
||||||
.addField(FormBuilder.text(
|
.addFieldIf(() -> hasASK,
|
||||||
Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_TAG,
|
() -> FormBuilder.text(
|
||||||
TITLE_TEXT_FORM_TAG)
|
Domain.SEB_SECURITY_KEY_REGISTRY.ATTR_TAG,
|
||||||
.mandatory())
|
TITLE_TEXT_FORM_TAG)
|
||||||
|
.mandatory())
|
||||||
|
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ sebserver.webservice.http.redirect.gui=/gui
|
||||||
sebserver.webservice.api.admin.endpoint=/admin-api/v1
|
sebserver.webservice.api.admin.endpoint=/admin-api/v1
|
||||||
sebserver.webservice.api.admin.accessTokenValiditySeconds=3600
|
sebserver.webservice.api.admin.accessTokenValiditySeconds=3600
|
||||||
sebserver.webservice.api.admin.refreshTokenValiditySeconds=-1
|
sebserver.webservice.api.admin.refreshTokenValiditySeconds=-1
|
||||||
|
sebserver.webservice.api.admin.exam.app.signature.key.enabled=true
|
||||||
sebserver.webservice.api.exam.config.init.permittedProcesses=config/initialPermittedProcesses.xml
|
sebserver.webservice.api.exam.config.init.permittedProcesses=config/initialPermittedProcesses.xml
|
||||||
sebserver.webservice.api.exam.config.init.prohibitedProcesses=config/initialProhibitedProcesses.xml
|
sebserver.webservice.api.exam.config.init.prohibitedProcesses=config/initialProhibitedProcesses.xml
|
||||||
sebserver.webservice.api.exam.time-prefix=0
|
sebserver.webservice.api.exam.time-prefix=0
|
||||||
|
|
|
@ -66,7 +66,7 @@ sebserver.webservice.api.admin.request.limit.refill=2
|
||||||
sebserver.webservice.api.admin.create.limit=10
|
sebserver.webservice.api.admin.create.limit=10
|
||||||
sebserver.webservice.api.admin.create.limit.interval.min=3600
|
sebserver.webservice.api.admin.create.limit.interval.min=3600
|
||||||
sebserver.webservice.api.admin.create.limit.refill=10
|
sebserver.webservice.api.admin.create.limit.refill=10
|
||||||
sebserver.webservice.api.admin.exam.app.signature.key.enabled=true
|
sebserver.webservice.api.admin.exam.app.signature.key.enabled=false
|
||||||
sebserver.webservice.api.exam.config.init.permittedProcesses=config/initialPermittedProcesses.xml
|
sebserver.webservice.api.exam.config.init.permittedProcesses=config/initialPermittedProcesses.xml
|
||||||
sebserver.webservice.api.exam.config.init.prohibitedProcesses=config/initialProhibitedProcesses.xml
|
sebserver.webservice.api.exam.config.init.prohibitedProcesses=config/initialProhibitedProcesses.xml
|
||||||
sebserver.webservice.api.exam.endpoint=/exam-api
|
sebserver.webservice.api.exam.endpoint=/exam-api
|
||||||
|
|
Loading…
Reference in a new issue