SEBSERV-142 fixes

This commit is contained in:
anhefti 2021-01-21 15:04:31 +01:00
parent c3b767b7a0
commit 004c54a173
3 changed files with 16 additions and 14 deletions

View file

@ -286,18 +286,20 @@ public class UserAccountDeletePopup {
final Form form = formHandle.getForm(); final Form form = formHandle.getForm();
form.getFieldInput(ARG_ALL_DEPENDENCIES) if (showDeps) {
.addListener(SWT.Selection, event -> { form.getFieldInput(ARG_ALL_DEPENDENCIES)
if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_ALL_DEPENDENCIES))) { .addListener(SWT.Selection, event -> {
form.setFieldValue(ARG_EXAMS_AND_DEPENDENCIES, Constants.FALSE_STRING); if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_ALL_DEPENDENCIES))) {
} form.setFieldValue(ARG_EXAMS_AND_DEPENDENCIES, Constants.FALSE_STRING);
}); }
form.getFieldInput(ARG_EXAMS_AND_DEPENDENCIES) });
.addListener(SWT.Selection, event -> { form.getFieldInput(ARG_EXAMS_AND_DEPENDENCIES)
if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_EXAMS_AND_DEPENDENCIES))) { .addListener(SWT.Selection, event -> {
form.setFieldValue(ARG_ALL_DEPENDENCIES, Constants.FALSE_STRING); if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_EXAMS_AND_DEPENDENCIES))) {
} form.setFieldValue(ARG_ALL_DEPENDENCIES, Constants.FALSE_STRING);
}); }
});
}
return () -> pageContext return () -> pageContext
.withAttribute(ARG_ALL_DEPENDENCIES, form.getFieldValue(ARG_ALL_DEPENDENCIES)) .withAttribute(ARG_ALL_DEPENDENCIES, form.getFieldValue(ARG_ALL_DEPENDENCIES))

View file

@ -271,7 +271,7 @@ public class UserAccountForm implements TemplateComposer {
.newAction(ActionDefinition.USER_ACCOUNT_DELETE) .newAction(ActionDefinition.USER_ACCOUNT_DELETE)
.withEntityKey(entityKey) .withEntityKey(entityKey)
.withExec(this.userAccountDeletePopup.deleteWizardFunction(pageContext)) .withExec(this.userAccountDeletePopup.deleteWizardFunction(pageContext))
.publishIf(() -> (writeGrant || ownAccount) && readonly && institutionActive) .publishIf(() -> writeGrant && readonly && institutionActive)
.newAction(ActionDefinition.USER_ACCOUNT_SAVE) .newAction(ActionDefinition.USER_ACCOUNT_SAVE)
.withEntityKey(entityKey) .withEntityKey(entityKey)

View file

@ -77,7 +77,7 @@ public class AuthorizationServiceImpl implements AuthorizationService {
.withInstitutionalPrivilege(PrivilegeType.READ) .withInstitutionalPrivilege(PrivilegeType.READ)
.withOwnerPrivilege(PrivilegeType.MODIFY) .withOwnerPrivilege(PrivilegeType.MODIFY)
.andForRole(UserRole.EXAM_SUPPORTER) .andForRole(UserRole.EXAM_SUPPORTER)
.withOwnerPrivilege(PrivilegeType.WRITE) .withOwnerPrivilege(PrivilegeType.MODIFY)
.create(); .create();
// grants for seb client config // grants for seb client config