fixed exeptionname
Co-Authored-By: kasch309 <kasch309@users.noreply.github.com> Co-Authored-By: andibuls <andibuls@users.noreply.github.com> Co-Authored-By: xxnitram <xxnitram@users.noreply.github.com> Co-Authored-By: Talha Caliskan <killerber4t@users.noreply.github.com>
This commit is contained in:
@ -6,7 +6,7 @@ import mops.gruppen2.domain.Role;
|
||||
import mops.gruppen2.domain.User;
|
||||
import mops.gruppen2.domain.exception.EventException;
|
||||
import mops.gruppen2.domain.exception.GroupNotFoundException;
|
||||
import mops.gruppen2.domain.exception.NoAdminAfterActionExeption;
|
||||
import mops.gruppen2.domain.exception.NoAdminAfterActionException;
|
||||
import mops.gruppen2.security.Account;
|
||||
import mops.gruppen2.service.ControllerService;
|
||||
import mops.gruppen2.service.CsvService;
|
||||
@ -234,7 +234,7 @@ public class Gruppen2Controller {
|
||||
Account account = keyCloakService.createAccountFromPrincipal(token);
|
||||
if (userId.equals(account.getName())) {
|
||||
if (controllerService.passIfLastAdmin(account, groupId)){
|
||||
throw new NoAdminAfterActionExeption("Du otto bist letzter Admin");
|
||||
throw new NoAdminAfterActionException("Du otto bist letzter Admin");
|
||||
}
|
||||
controllerService.updateRole(userId, groupId);
|
||||
return "redirect:/gruppen2/details/" + groupId;
|
||||
|
||||
Reference in New Issue
Block a user