mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-23 06:27:56 +01:00
Fix new user creation.
This commit is contained in:
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
Block a user