Ejemplo n.º 1
0
        public IEnumerable <IPermissionApplication> GetPermissions(DeleteUnstructuredDataDependenciesCommand command)
        {
            var entityDefinition = _entityDefinitionRepository.GetByCode(command.RootEntityDefinitionCode);

            EntityNotFoundException.ThrowIfNull(entityDefinition, command.RootEntityDefinitionCode);

            // Try and get a delete permission for the root entity.
            var permission = _permissionRepository.GetByEntityAndPermissionType(entityDefinition, CommonPermissionTypes.Delete("Entity"));

            if (permission != null)
            {
                yield return(permission);
            }
        }
Ejemplo n.º 2
0
 public RoleDeletePermission()
 {
     EntityDefinition = new RoleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Roles");
 }
Ejemplo n.º 3
0
 public DocumentAssetDeletePermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Document Assets");
 }
Ejemplo n.º 4
0
 public WebDirectoryDeletePermission()
 {
     EntityDefinition = new WebDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Web Directories");
 }
Ejemplo n.º 5
0
 public NonCofoundryUserDeletePermission()
 {
     EntityDefinition = new NonCofoundryUserEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Non Cofoundry Users");
 }
 public CustomEntityDeletePermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = CommonPermissionTypes.Delete(customEntityDefinition.NamePlural);
 }
Ejemplo n.º 7
0
 public PageDeletePermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Pages");
 }
Ejemplo n.º 8
0
 public ImageAssetDeletePermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Image Assets");
 }