Fix new user creation.
parent
07e8259417
commit
3eaeb8f500
|
@ -47,7 +47,6 @@ public class MapAccessPermissionEvaluation implements PermissionEvaluator {
|
|||
result = hasPrivilege(map, perm);
|
||||
} else if (targetDomainObject instanceof Collaborator collab) {
|
||||
// Read only operations checks ...
|
||||
assert user != null;
|
||||
result = user.identityEquality(collab) || readAdvice.getMindmapService().isAdmin(user);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unsupported check control of permissions");
|
||||
|
|
|
@ -168,7 +168,7 @@ public class MindmapServiceImpl
|
|||
}
|
||||
|
||||
@Override
|
||||
@PreAuthorize("hasAnyRole('USER', 'ADMIN') && hasPermission(#mindmap, 'WRITE')")
|
||||
@PreAuthorize("hasPermission(#mindmap, 'WRITE')")
|
||||
public void addMindmap(@NotNull Mindmap mindmap, @NotNull User user) {
|
||||
|
||||
final String title = mindmap.getTitle();
|
||||
|
|
Loading…
Reference in New Issue