use of com.emc.sa.api.utils.CatalogACLInputFilter in project coprhd-controller by CoprHD.
the class CatalogCategoryService method updateRoleAssignments.
@PUT
@Path("/{id}/acl")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SECURITY_ADMIN, Role.TENANT_ADMIN }, acls = { ACL.OWN }, blockProxies = true)
public ACLAssignments updateRoleAssignments(@PathParam("id") URI id, ACLAssignmentChanges changes) {
CatalogCategory catalogCategory = catalogCategoryManager.getCatalogCategoryById(id);
URI tenantId = uri(catalogCategory.getTenant());
_permissionsHelper.updateACLs(catalogCategory, changes, new CatalogACLInputFilter(tenantId));
catalogCategoryManager.updateCatalogCategory(catalogCategory);
;
auditOpSuccess(OperationTypeEnum.MODIFY_CATALOG_CATEGORY_ACL, catalogCategory.getId().toString(), catalogCategory.getLabel(), changes);
catalogConfigUtils.notifyCatalogAclChange();
return getRoleAssignmentsResponse(id);
}
use of com.emc.sa.api.utils.CatalogACLInputFilter in project coprhd-controller by CoprHD.
the class CatalogServiceService method updateRoleAssignments.
@PUT
@Path("/{id}/acl")
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SECURITY_ADMIN, Role.TENANT_ADMIN }, acls = { ACL.OWN }, blockProxies = true)
public ACLAssignments updateRoleAssignments(@PathParam("id") URI id, ACLAssignmentChanges changes) {
CatalogService catalogService = catalogServiceManager.getCatalogServiceById(id);
CatalogCategory parentCatalogCategory = catalogCategoryManager.getCatalogCategoryById(catalogService.getCatalogCategoryId().getURI());
URI tenantId = uri(parentCatalogCategory.getTenant());
_permissionsHelper.updateACLs(catalogService, changes, new CatalogACLInputFilter(tenantId));
catalogServiceManager.updateCatalogService(catalogService, null);
;
auditOpSuccess(OperationTypeEnum.MODIFY_CATALOG_SERVICE_ACL, catalogService.getId().toString(), catalogService.getLabel(), changes);
catalogConfigUtils.notifyCatalogAclChange();
return getRoleAssignmentsResponse(id);
}
Aggregations