mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 13:47:57 +01:00
Fix typo
This commit is contained in:
parent
2981fe79f7
commit
7c060ee192
@ -20,13 +20,13 @@ package com.wisemapping.exceptions;
|
|||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
public class OnwerCollabCannotChangeException
|
public class OwnerCannotChangeException
|
||||||
extends ClientException
|
extends ClientException
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final String MSG_KEY = "OWNER_ROLE_CAN_NOT_BE_CHANGED";
|
private static final String MSG_KEY = "OWNER_ROLE_CAN_NOT_BE_CHANGED";
|
||||||
|
|
||||||
public OnwerCollabCannotChangeException(@NotNull String email)
|
public OwnerCannotChangeException(@NotNull String email)
|
||||||
{
|
{
|
||||||
super("Collab email can not be change. " + email + " is the the owner.",Severity.WARNING);
|
super("Collab email can not be change. " + email + " is the the owner.",Severity.WARNING);
|
||||||
}
|
}
|
@ -299,7 +299,7 @@ public class MindmapController extends BaseController {
|
|||||||
|
|
||||||
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"})
|
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/collabs/", consumes = {"application/json"}, produces = {"application/json"})
|
||||||
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
@ResponseStatus(value = HttpStatus.NO_CONTENT)
|
||||||
public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException, TooManyInactiveAccountsExceptions, OnwerCollabCannotChangeException {
|
public void addCollab(@PathVariable int id, @NotNull @RequestBody RestCollaborationList restCollabs) throws CollaborationException, MapCouldNotFoundException, AccessDeniedSecurityException, InvalidEmailException, TooManyInactiveAccountsExceptions, OwnerCannotChangeException {
|
||||||
final Mindmap mindMap = findMindmapById(id);
|
final Mindmap mindMap = findMindmapById(id);
|
||||||
|
|
||||||
// Only owner can change collaborators...
|
// Only owner can change collaborators...
|
||||||
@ -346,12 +346,12 @@ public class MindmapController extends BaseController {
|
|||||||
|
|
||||||
// Are we trying to change the owner ...
|
// Are we trying to change the owner ...
|
||||||
if (currentCollab != null && currentCollab.getRole() == CollaborationRole.OWNER) {
|
if (currentCollab != null && currentCollab.getRole() == CollaborationRole.OWNER) {
|
||||||
throw new OnwerCollabCannotChangeException(collabEmail);
|
throw new OwnerCannotChangeException(collabEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Role can not be changed ...
|
// Role can not be changed ...
|
||||||
if (newRole == CollaborationRole.OWNER) {
|
if (newRole == CollaborationRole.OWNER) {
|
||||||
throw new OnwerCollabCannotChangeException(collabEmail);
|
throw new OwnerCannotChangeException(collabEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is collaboration that with different newRole, try to change it ...
|
// This is collaboration that with different newRole, try to change it ...
|
||||||
|
Loading…
Reference in New Issue
Block a user