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();
form.getFieldInput(ARG_ALL_DEPENDENCIES)
.addListener(SWT.Selection, event -> {
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 -> {
if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_EXAMS_AND_DEPENDENCIES))) {
form.setFieldValue(ARG_ALL_DEPENDENCIES, Constants.FALSE_STRING);
}
});
if (showDeps) {
form.getFieldInput(ARG_ALL_DEPENDENCIES)
.addListener(SWT.Selection, event -> {
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 -> {
if (Constants.TRUE_STRING.equals(form.getFieldValue(ARG_EXAMS_AND_DEPENDENCIES))) {
form.setFieldValue(ARG_ALL_DEPENDENCIES, Constants.FALSE_STRING);
}
});
}
return () -> pageContext
.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)
.withEntityKey(entityKey)
.withExec(this.userAccountDeletePopup.deleteWizardFunction(pageContext))
.publishIf(() -> (writeGrant || ownAccount) && readonly && institutionActive)
.publishIf(() -> writeGrant && readonly && institutionActive)
.newAction(ActionDefinition.USER_ACCOUNT_SAVE)
.withEntityKey(entityKey)

View file

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