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