internal FullSecurityAccessHelper(IBaseTenantContext db, bool allTenants, bool hideGlobals) { this.db = db; HideGlobals = hideGlobals; ShowAllTenants = allTenants; CreatedWithContext = true; db.RegisterSecurityRollback(this); }
public PlugInController(IBaseTenantContext db, IInjectablePlugin <WebPluginAnalyzer> analyzer, IServiceProvider services) { this.db = db; this.analyzer = analyzer; if (!services.VerifyUserPermissions(new[] { EntityFramework.TenantSecurityShared.Helpers.ToolkitPermission.Sysadmin })) { db.HideGlobals = true; isSysAdmin = false; } else { db.ShowAllTenants = true; isSysAdmin = true; } }
public PlugInConstController(IBaseTenantContext db, IServiceProvider services, IOptions <SecurityViewsOptions> options) { this.db = db; this.options = options; if (!services.VerifyUserPermissions(new[] { EntityFramework.TenantSecurityShared.Helpers.ToolkitPermission.Sysadmin })) { db.HideGlobals = true; isSysAdmin = false; } else { db.ShowAllTenants = true; isSysAdmin = true; } }
/// <summary> /// Initializes a new instance of the DbPluginFormatter class /// </summary> /// <param name="context">the database containing formatting-hints</param> public DbPluginFormatter(IBaseTenantContext context) { context.WebPluginConstants.ForEach(n => { formatPrototype.Add(n.Name, n.Value); publicPrototypeIndicators.Add(n.Name, n.TenantId == null); }); int?tenantId; if ((tenantId = context.CurrentTenantId) != null) { var t = context.Tenants.First(n => n.TenantId == tenantId); if (!string.IsNullOrEmpty(t.TenantPassword)) { encryptedPassword = t.TenantPassword.Encrypt(); } } }
/// <summary> /// Initializes a new instance of hte DbPluginsSelector class /// </summary> /// <param name="securityContext">the injected security-db-context</param> public DbPluginsSelector(IBaseTenantContext securityContext) { this.securityContext = securityContext; }
public GlobalSettingsController(IBaseTenantContext db) { this.db = db; db.ShowAllTenants = true; }
public SystemLogController(IBaseTenantContext db) { this.db = db; db.ShowAllTenants = true; }
public AuthenticationTypeController(IBaseTenantContext db) { this.db = db; }
public TenantTemplateController(IBaseTenantContext db, ITenantTemplateHelper templateHelper) { this.db = db; this.templateHelper = templateHelper; db.ShowAllTenants = true; }
/// <summary> /// Initializes a new instance of the TenantSettinsgProvider class /// </summary> /// <param name="dbContext"></param> public GlobalSettingsProvider(IBaseTenantContext dbContext) { this.dbContext = dbContext; }
public FeatureController(IBaseTenantContext db) { this.db = db; db.ShowAllTenants = true; }
public VideoTutorialFileHandler(IBaseTenantContext db) { this.db = db; }
public DbLogOutputAdapter(IBaseTenantContext db) { this.db = db; }
public DbTutorialSource(IBaseTenantContext dbContext) { this.dbContext = dbContext; }
public ModuleVideoController(IBaseTenantContext db, IHierarchySettings <TutorialOptions> options) { this.db = db; this.options = options; }