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)); }
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"); }
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()); }
public PagePublishPermission() { EntityDefinition = new PageEntityDefinition(); PermissionType = new PermissionType("PAGPUB", "Publish", "Publish or unpublish a page"); }
public PageUpdateUrlPermission() { EntityDefinition = new PageEntityDefinition(); PermissionType = new PermissionType("UPDURL", "Update Page Url", "Update the url of a page"); }