add button elements depending on various factors
This commit is contained in:
@ -14,8 +14,14 @@ public class UpdateRoleEvent extends Event {
|
||||
Role newRole;
|
||||
|
||||
public UpdateRoleEvent(Long event_id, Long group_id, String user_id, Role newRole) {
|
||||
super(event_id, group_id, user_id);
|
||||
super(event_id,+ group_id, user_id);
|
||||
|
||||
this.newRole = newRole;
|
||||
}
|
||||
public UpdateRoleEvent(Long group_id, String user_id, Role newRole) {
|
||||
super(group_id, user_id);
|
||||
|
||||
this.newRole = newRole;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package mops.gruppen2.service;
|
||||
|
||||
import mops.gruppen2.domain.GroupType;
|
||||
import mops.gruppen2.domain.Role;
|
||||
import mops.gruppen2.domain.Visibility;
|
||||
import mops.gruppen2.domain.event.*;
|
||||
import mops.gruppen2.security.Account;
|
||||
@ -20,10 +21,12 @@ public class ControllerService {
|
||||
AddUserEvent addUserEvent = new AddUserEvent(eventService.checkGroup(), account.getName(),account.getGivenname(),account.getFamilyname(),account.getEmail());
|
||||
UpdateGroupTitleEvent updateGroupTitleEvent = new UpdateGroupTitleEvent(eventService.checkGroup(), account.getName(), title);
|
||||
UpdateGroupDescriptionEvent updateGroupDescriptionEvent = new UpdateGroupDescriptionEvent(eventService.checkGroup(), account.getName(), beschreibung);
|
||||
UpdateRoleEvent updateRoleEvent = new UpdateRoleEvent(eventService.checkGroup(),account.getName(), Role.ADMIN);
|
||||
|
||||
eventService.saveEvent(createGroupEvent);
|
||||
eventService.saveEvent(addUserEvent);
|
||||
eventService.saveEvent(updateGroupTitleEvent);
|
||||
eventService.saveEvent(updateGroupDescriptionEvent);
|
||||
eventService.saveEvent(updateRoleEvent);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user