use of com.netflix.spinnaker.fiat.model.UserPermission in project fiat by spinnaker.
the class RolesController method putUserPermission.
@RequestMapping(value = "/{userId:.+}", method = RequestMethod.POST)
public void putUserPermission(@PathVariable String userId) {
try {
UserPermission userPermission = permissionsResolver.resolve(ControllerSupport.convert(userId));
log.debug("Updated user permissions (userId: {}, roles: {})", userId, userPermission.getRoles().stream().map(Role::getName).collect(Collectors.toList()));
permissionsRepository.put(userPermission);
} catch (PermissionResolutionException pre) {
throw new UserPermissionModificationException(pre);
}
}
Aggregations