Improve error handle on security errors.
This commit is contained in:
@@ -176,7 +176,7 @@ public class MindmapController {
|
||||
private MindMapBean findMindmapBean(int mapId) throws MapCouldNotFoundException, AccessDeniedSecurityException {
|
||||
final User user = Utils.getUser();
|
||||
if (!mindmapService.hasPermissions(user, mapId, CollaborationRole.VIEWER)) {
|
||||
throw new AccessDeniedSecurityException("No enough permissions to open map with id " + mapId);
|
||||
throw new AccessDeniedSecurityException(mapId, user);
|
||||
}
|
||||
|
||||
final Mindmap mindmap = findMindmap(mapId);
|
||||
|
Reference in New Issue
Block a user