public GeneralCommonSettingsModel()
 {
     SiteInformationSettings = new SiteInformationSettingsModel();
     SeoSettings = new SeoSettingsModel();
     SecuritySettings = new SecuritySettingsModel();
     DomainSettings = new DomainSettingsModel();
 }
Esempio n. 2
0
 public GeneralCommonSettingsModel()
 {
     BlogInformationSettings = new BlogInformationSettingsModel();
     SeoSettings             = new SeoSettingsModel();
     SecuritySettings        = new SecuritySettingsModel();
     CaptchaSettings         = new CaptchaSettingsModel();
     LocalizationSettings    = new LocalizationSettingsModel();
 }
Esempio n. 3
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings          = new SeoSettingsModel();
     SecuritySettings     = new SecuritySettingsModel();
     PdfSettings          = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
 }
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings = new SeoSettingsModel();
     SecuritySettings = new SecuritySettingsModel();
     PdfSettings = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
 }
Esempio n. 5
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings          = new SeoSettingsModel();
     SecuritySettings     = new SecuritySettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
     FullTextSettings     = new FullTextSettingsModel();
     SocialSettings       = new SocialSettingsModel();
 }
Esempio n. 6
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings             = new SeoSettingsModel();
     SecuritySettings        = new SecuritySettingsModel();
     PdfSettings             = new PdfSettingsModel();
     LocalizationSettings    = new LocalizationSettingsModel();
     FullTextSettings        = new FullTextSettingsModel();
     GoogleAnalyticsSettings = new GoogleAnalyticsSettingsModel();
 }
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings          = new SeoSettingsModel();
     SecuritySettings     = new SecuritySettingsModel();
     CaptchaSettings      = new CaptchaSettingsModel();
     PdfSettings          = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
     FullTextSettings     = new FullTextSettingsModel();
 }
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     DateTimeSettings         = new DateTimeSettingsModel();
     SeoSettings             = new SeoSettingsModel();
     SecuritySettings        = new SecuritySettingsModel();
     PdfSettings             = new PdfSettingsModel();
     GoogleAnalyticsSettings = new GoogleAnalyticsSettingsModel();
     DisplayMenuSettings     = new DisplayMenuSettingsModel();
 }
Esempio n. 9
0
        public IHttpActionResult Post(SecuritySettingsModel entityModel)
        {
            var securitySettings = new SecuritySettings()
            {
                DefaultPasswordStorageFormat = entityModel.DefaultPasswordStorageFormat
            };

            _settingService.Save(securitySettings);
            VerboseReporter.ReportSuccess("Settings saved successfully", "post_setting");
            return(RespondSuccess(new { SecuritySettings = securitySettings.ToModel() }));
        }
Esempio n. 10
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings             = new SeoSettingsModel();
     SecuritySettings        = new SecuritySettingsModel();
     PdfSettings             = new PdfSettingsModel();
     LocalizationSettings    = new LocalizationSettingsModel();
     FullTextSettings        = new FullTextSettingsModel();
     GoogleAnalyticsSettings = new GoogleAnalyticsSettingsModel();
     DisplayMenuSettings     = new DisplayMenuSettingsModel();
     KnowledgebaseSettings   = new KnowledgebaseSettingsModel();
 }
Esempio n. 11
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings                = new SeoSettingsModel();
     SecuritySettings           = new SecuritySettingsModel();
     CaptchaSettings            = new CaptchaSettingsModel();
     PdfSettings                = new PdfSettingsModel();
     LocalizationSettings       = new LocalizationSettingsModel();
     CompanyInformationSettings = new CompanyInformationSettingsModel();
     ContactDataSettings        = new ContactDataSettingsModel();
     BankConnectionSettings     = new BankConnectionSettingsModel();
     SocialSettings             = new SocialSettingsModel();
 }
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings = new SeoSettingsModel();
     SecuritySettings = new SecuritySettingsModel();
     CaptchaSettings = new CaptchaSettingsModel();
     PdfSettings = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
     FullTextSettings = new FullTextSettingsModel();
     CompanyInformationSettings = new CompanyInformationSettingsModel();
     ContactDataSettings = new ContactDataSettingsModel();
     BankConnectionSettings = new BankConnectionSettingsModel();
     SocialSettings = new SocialSettingsModel();
 }
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings = new SeoSettingsModel();
     SecuritySettings = new SecuritySettingsModel();
     PdfSettings = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel(); 
     FullTextSettings = new FullTextSettingsModel();
     //codehint: sm-add begin
     CompanyInformationSettings = new CompanyInformationSettingsModel();
     ContactDataSettings = new ContactDataSettingsModel();
     BankConnectionSettings = new BankConnectionSettingsModel();
     SocialSettings = new SocialSettingsModel();
     //codehint: sm-add end
 }
Esempio n. 14
0
 public GeneralCommonSettingsModel()
 {
     StoreInformationSettings = new StoreInformationSettingsModel();
     SeoSettings          = new SeoSettingsModel();
     SecuritySettings     = new SecuritySettingsModel();
     PdfSettings          = new PdfSettingsModel();
     LocalizationSettings = new LocalizationSettingsModel();
     FullTextSettings     = new FullTextSettingsModel();
     //codehint: sm-add begin
     CompanyInformationSettings = new CompanyInformationSettingsModel();
     ContactDataSettings        = new ContactDataSettingsModel();
     BankConnectionSettings     = new BankConnectionSettingsModel();
     SocialSettings             = new SocialSettingsModel();
     //codehint: sm-add end
 }
        public static SecuritySettingsModel ToModel(this SecuritySettings securitySettings)
        {
            var model = new SecuritySettingsModel()
            {
                DefaultPasswordStorageFormat    = securitySettings.DefaultPasswordStorageFormat,
                AvailablePasswordStorageFormats = new List <dynamic>()
                {
                    new { Value = PasswordFormat.Md5Hashed, DisplayText = "MD5" },
                    new { Value = PasswordFormat.Sha1Hashed, DisplayText = "SHA1" },
                    new { Value = PasswordFormat.Sha256Hashed, DisplayText = "SHA256" }
                }
            };

            return(model);
        }
Esempio n. 16
0
        protected Task <SecuritySettingsModel> PrepareSecuritySettingsModel()
        {
            var tenantId         = _tenantContext.ActiveTenantScopeConfiguration;
            var securitySettings = _settingService.LoadSetting <SecuritySettings>(tenantId);

            var model = new SecuritySettingsModel
            {
                EncryptionKey        = securitySettings.EncryptionKey,
                ForceSslForAllPages  = securitySettings.ForceSslForAllPages,
                EnableXsrfProtection = securitySettings.EnableXsrfProtection
            };

            if (securitySettings.AllowedIpAddresses != null)
            {
                model.AllowedIpAddresses = string.Join(",", securitySettings.AllowedIpAddresses);
            }

            return(Task.FromResult(model));
        }
Esempio n. 17
0
        /// <summary>
        /// Prepare security settings model
        /// </summary>
        /// <returns>Security settings model</returns>
        protected virtual SecuritySettingsModel PrepareSecuritySettingsModel()
        {
            //load settings for a chosen store scope
            var securitySettings = _settingService.LoadSetting <SecuritySettings>();

            //fill in model values from the entity
            var model = new SecuritySettingsModel
            {
                EncryptionKey       = securitySettings.EncryptionKey,
                ForceSslForAllPages = securitySettings.ForceSslForAllPages,
                EnableXsrfProtectionForAdminArea  = securitySettings.EnableXsrfProtectionForAdminArea,
                EnableXsrfProtectionForPublicSite = securitySettings.EnableXsrfProtectionForSite,
                HoneypotEnabled = securitySettings.HoneypotEnabled
            };

            //fill in additional values (not existing in the entity)
            if (securitySettings.AdminAreaAllowedIpAddresses != null)
            {
                model.AdminAreaAllowedIpAddresses = string.Join(",", securitySettings.AdminAreaAllowedIpAddresses);
            }

            return(model);
        }
Esempio n. 18
0
 public IActionResult SaveSettings(SecuritySettingsModel securitySettings)
 {
     SaveSetting(securitySettings);
     return(R.Success.Result);
 }
 public SecuritySettingsPage()
 {
     InitializeComponent();
     DataContext = new SecuritySettingsModel();
     MarkdownDocument.KnownSchemes.Add("ms-settings");
 }
 public SecuritySettingsPage()
 {
     InitializeComponent();
     DataContext = new SecuritySettingsModel();
 }