internal FullSecurityAccessHelper(IBaseTenantContext db, bool allTenants, bool hideGlobals)
 {
     this.db            = db;
     HideGlobals        = hideGlobals;
     ShowAllTenants     = allTenants;
     CreatedWithContext = true;
     db.RegisterSecurityRollback(this);
 }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
        /// <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();
                }
            }
        }
Ejemplo n.º 5
0
 /// <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;
 }
Ejemplo n.º 6
0
 public GlobalSettingsController(IBaseTenantContext db)
 {
     this.db           = db;
     db.ShowAllTenants = true;
 }
Ejemplo n.º 7
0
 public SystemLogController(IBaseTenantContext db)
 {
     this.db           = db;
     db.ShowAllTenants = true;
 }
 public AuthenticationTypeController(IBaseTenantContext db)
 {
     this.db = db;
 }
Ejemplo n.º 9
0
 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;
 }
Ejemplo n.º 11
0
 public FeatureController(IBaseTenantContext db)
 {
     this.db           = db;
     db.ShowAllTenants = true;
 }
 public VideoTutorialFileHandler(IBaseTenantContext db)
 {
     this.db = db;
 }
Ejemplo n.º 13
0
 public DbLogOutputAdapter(IBaseTenantContext db)
 {
     this.db = db;
 }
Ejemplo n.º 14
0
 public DbTutorialSource(IBaseTenantContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public ModuleVideoController(IBaseTenantContext db, IHierarchySettings <TutorialOptions> options)
 {
     this.db      = db;
     this.options = options;
 }