final Map<String, Boolean> commandPermissions = permissionsCommand.getPermissions();
final Map<String, Object> changes = new HashMap<>();
final Map<String, Boolean> changedPermissions = new HashMap<>();
for (final String permissionCode : commandPermissions.keySet()) {
final Permission permission = findPermissionInCollectionByCode(allPermissions, permissionCode);
if (permission.getCode().endsWith("_CHECKER") || permission.getCode().startsWith("READ_")
|| permission.getGrouping().equalsIgnoreCase("special")) { throw new PermissionNotFoundException(permissionCode); }
final boolean isSelected = commandPermissions.get(permissionCode).booleanValue();
final boolean changed = permission.enableMakerChecker(isSelected);
if (changed) {
changedPermissions.put(permissionCode, isSelected);
this.permissionRepository.save(permission);
}
}