added command to remove the role from mod mail configuration again

added convenience method to disallow a whole feature for a role
This commit is contained in:
Sheldan
2020-05-08 12:11:35 +02:00
parent 4236db7a5b
commit 9fdca52005
12 changed files with 81 additions and 1 deletions

View File

@@ -97,5 +97,13 @@ public class CommandServiceBean implements CommandService {
commandForServer.getAllowedRoles().removeIf(role1 -> role1.getId().equals(role.getId()));
}
@Override
public void disAllowFeatureForRole(FeatureEnum featureEnum, ARole role) {
AFeature feature = featureManagementService.getFeature(featureEnum.getKey());
feature.getCommands().forEach(command -> {
this.disAllowCommandForRole(command, role);
});
}
}