示例#1
0
        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);
            }
        }
示例#2
0
 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");
 }
示例#5
0
 public RoleReadPermission()
 {
     EntityDefinition = new RoleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Roles");
 }
示例#6
0
 public CustomEntityReadPermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = CommonPermissionTypes.Read(customEntityDefinition.NamePlural);
 }
 public ImageAssetReadPermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Image Assets");
 }
示例#8
0
 public DocumentAssetReadPermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Document Assets");
 }