1

Implementation of old EventExeptions

This commit is contained in:
Lukas Ettel
2020-03-17 15:57:26 +01:00
parent 1acfcc449f
commit 991bcf2aaa
8 changed files with 78 additions and 45 deletions

View File

@ -24,7 +24,10 @@ public class UpdateRoleEvent extends Event {
this.newRole = newRole;
}
public void apply(Group group) {
public void apply(Group group) throws UserNotFoundException{
if (group.getRoles().containsKey(user_id)){
throw new UserNotFoundException("Der User wurde nicht gefunden");
}
group.getRoles().put(this.user_id, this.newRole);
}