Esempio n. 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);
            }
        }
 public CurrentUserUpdatePermission()
 {
     EntityDefinition = new CurrentUserEntityDefinition();
     PermissionType   = CommonPermissionTypes.Update("Current User");
 }
 public CofoundryUserReadPermission()
 {
     EntityDefinition = new UserEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Cofoundry Users");
 }
Esempio n. 4
0
 public WebDirectoryUpdatePermission()
 {
     EntityDefinition = new WebDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.Update("Web Directories");
 }
Esempio n. 5
0
 public PageTemplateUpdatePermission()
 {
     EntityDefinition = new PageTemplateEntityDefinition();
     PermissionType   = CommonPermissionTypes.Update("Page Templates");
 }
 public PageDirectoryAdminModulePermission()
 {
     EntityDefinition = new PageDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Page Directories");
 }
 public ImageAssetDeletePermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Image Assets");
 }
 public ImageAssetAdminModulePermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Image Assets");
 }
Esempio n. 9
0
 public RoleReadPermission()
 {
     EntityDefinition = new RoleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Roles");
 }
 public SettingsAdminModulePermission()
 {
     EntityDefinition = new SettingsEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Settings");
 }
Esempio n. 11
0
 public ImageAssetReadPermission()
 {
     EntityDefinition = new ImageAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Image Assets");
 }
 public CurrentUserAdminModulePermission()
 {
     EntityDefinition = new CurrentUserEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Current User Account");
 }
Esempio n. 13
0
 public DocumentAssetReadPermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Document Assets");
 }
 public CustomEntityCreatePermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = CommonPermissionTypes.Create(customEntityDefinition.NamePlural);
 }
Esempio n. 15
0
 public PageDeletePermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Pages");
 }
Esempio n. 16
0
 public DocumentAssetDeletePermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Document Assets");
 }
 public CofoundryUserCreatePermission()
 {
     EntityDefinition = new UserEntityDefinition();
     PermissionType   = CommonPermissionTypes.Create("Cofoundry Users");
 }
Esempio n. 18
0
 public RewriteRuleUpdatePermission()
 {
     EntityDefinition = new RewriteRuleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Update("Rewrite Rules");
 }
Esempio n. 19
0
 public NonCofoundryUserDeletePermission()
 {
     EntityDefinition = new NonCofoundryUserEntityDefinition();
     PermissionType   = CommonPermissionTypes.Delete("Non Cofoundry Users");
 }
 public RewriteRuleAdminModulePermission()
 {
     EntityDefinition = new RewriteRuleEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Rewrite Rules");
 }
Esempio n. 21
0
 public PageAdminModulePermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Pages");
 }
Esempio n. 22
0
 public PageReadPermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Pages");
 }
 public CustomEntityAdminModulePermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = CommonPermissionTypes.AdminModule(customEntityDefinition.NamePlural);
 }
 public CofoundryUserAdminModulePermission()
 {
     EntityDefinition = new UserEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Cofoundry Users");
 }
 public DocumentAssetAdminModulePermission()
 {
     EntityDefinition = new DocumentAssetEntityDefinition();
     PermissionType   = CommonPermissionTypes.AdminModule("Document Assets");
 }
Esempio n. 26
0
 public RoleCreatePermission()
 {
     EntityDefinition = new RoleEntityDefinition();
     PermissionType   = CommonPermissionTypes.Create("Roles");
 }
 public PageDirectoryReadPermission()
 {
     EntityDefinition = new PageDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.Read("Page Directories");
 }
        public IEnumerable <IPermissionApplication> GetPermissions(UpdateUnstructuredDataDependenciesCommand 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.Update("Entity"));

            if (permission != null)
            {
                yield return(permission);
            }
        }
Esempio n. 29
0
 public PageDirectoryCreatePermission()
 {
     EntityDefinition = new PageDirectoryEntityDefinition();
     PermissionType   = CommonPermissionTypes.Create("Page Directories");
 }