예제 #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);
            }
        }
예제 #2
0
 public RoleDeletePermission()
 {
     EntityDefinition = new RoleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Roles");
 }
예제 #3
0
 public DocumentAssetDeletePermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Document Assets");
 }
예제 #4
0
 public WebDirectoryDeletePermission()
 {
     EntityDefinition = new WebDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Web Directories");
 }
예제 #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);
 }
예제 #7
0
 public PageDeletePermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Pages");
 }
예제 #8
0
 public ImageAssetDeletePermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Image Assets");
 }