Exemplo n.º 1
0
        private string CreateUniqueToken(PermissionType permissionType, IEntityDefinition definition = null)
        {
            if (permissionType == null || string.IsNullOrWhiteSpace(permissionType.Code))
            {
                return(null);
            }

            if (definition == null)
            {
                return(CreateUniqueToken(permissionType.Code));
            }
            return(CreateUniqueToken(permissionType.Code, definition.EntityDefinitionCode));
        }
Exemplo n.º 2
0
 public IPermission GetByEntityAndPermissionType(IEntityDefinition entityDefinition, PermissionType permissionType)
 {
     if (entityDefinition == null || permissionType == null)
     {
         return(null);
     }
     return(GetByEntityAndPermissionType(entityDefinition.EntityDefinitionCode, permissionType.Code));
 }
 public GeneralSettingsUpdatePermission()
 {
     EntityDefinition = new SettingsEntityDefinition();
     PermissionType   = new PermissionType("GENUPD", "Update General", "Update General Settings");
 }
Exemplo n.º 4
0
 public DashboardAdminModulePermission()
 {
     PermissionType = new PermissionType("COFDSH", "Dashboard", "View the dashboard in the admin panel");
 }
 public SeoSettingsUpdatePermission()
 {
     EntityDefinition = new SettingsEntityDefinition();
     PermissionType   = new PermissionType("SEOUPD", "Update SEO", "Update SEO Settings");
 }
 public CustomEntityUpdateUrlPermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = new PermissionType("UPDURL", "Update custom entity Url", "Update the url of a " + customEntityDefinition.Name);
 }
 public CustomEntityPublishPermission(ICustomEntityDefinition customEntityDefinition)
 {
     EntityDefinition = new CustomEntityDynamicEntityDefinition(customEntityDefinition);
     PermissionType   = new PermissionType("CMEPUB", "Publish", "Publish or unpublish a " + customEntityDefinition.Name.ToLower());
 }
Exemplo n.º 8
0
 public PagePublishPermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = new PermissionType("PAGPUB", "Publish", "Publish or unpublish a page");
 }
Exemplo n.º 9
0
 public PageUpdateUrlPermission()
 {
     EntityDefinition = new PageEntityDefinition();
     PermissionType   = new PermissionType("UPDURL", "Update Page Url", "Update the url of a page");
 }