if (resourceRequest != null) {
RoleResource resource = resourceRequest.getData();
try {
AuthorizationManager authzManager = getSecuritySystem().getAuthorizationManager(ROLE_SOURCE);
Role role = restToSecurityModel(authzManager.getRole(resource.getId()), resource);
validateRoleContainment(role);
authzManager.updateRole(role);
resourceResponse = new RoleResourceResponse();
resourceResponse.setData(resourceRequest.getData());
resourceResponse.getData().setUserManaged(!role.isReadOnly());
resourceResponse.getData().setResourceURI(createChildReference(request, resource.getId()).toString());
}
catch (NoSuchRoleException e) {