public IEnumerable <IPermissionApplication> GetPermissions(GetEntityDependencySummaryByRelatedEntityQuery query) { var entityDefinition = _entityDefinitionRepository.GetByCode(query.EntityDefinitionCode); if (entityDefinition == null) { yield break; } // Try and get a read permission for the entity. var permission = _permissionRepository.GetByEntityAndPermissionType(entityDefinition, CommonPermissionTypes.Read("Entity")); if (permission != null) { yield return(permission); } }
public PageReadPermission() { EntityDefinition = new PageEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Pages"); }
public CofoundryUserReadPermission() { EntityDefinition = new UserEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Cofoundry Users"); }
public PageDirectoryReadPermission() { EntityDefinition = new PageDirectoryEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Page Directories"); }
public RoleReadPermission() { EntityDefinition = new RoleEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Roles"); }
public CustomEntityReadPermission(ICustomEntityDefinition customEntityDefinition) { EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition); PermissionType = CommonPermissionTypes.Read(customEntityDefinition.NamePlural); }
public ImageAssetReadPermission() { EntityDefinition = new ImageAssetEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Image Assets"); }
public DocumentAssetReadPermission() { EntityDefinition = new DocumentAssetEntityDefinition(); PermissionType = CommonPermissionTypes.Read("Document Assets"); }