Hi
I want to change some pre-installed settings like security settings because I am planning to remove the angular components for it and dont give the user the chance to be able to change this.
How can I change this settings and set the values in database (or where they are stored)? I am using asp.net core and angular 2.
Thanks.
10 Answer(s)
-
0
Here is how the related settings are retrieved <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Configuration/Tenants/TenantSettingsAppService.cs#L156">https://github.com/aspnetzero/aspnet-ze ... ce.cs#L156</a>.
So, you can store them in DB using related setting names.
-
0
Hi,
In which table they are stored in? I dont see any settings in a clean installation.
-
0
hi,
All the settings are stored in AbpSettings table. But if a setting is in default value then it's not saved in AbpSetting table. You can only see modified values in AbpSettings table. If you want to override setting values you can seed the DB or insert manually. Then application will read your settings from table.
-
0
Hi,
Where are default values stored?
Also can you point on where the seed is done?
Thanks
-
0
hi,
You can use GetAllSettingValuesAsyncin ISettingManagerclass. <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Configuration/ISettingManager.cs#L92">https://github.com/aspnetboilerplate/as ... ger.cs#L92</a>
You can seed DB in EntityFrameworkCoreproject. Use SeedHelper's SeedHostDbmethod to insert into AbpSettingstable.
-
0
Hi,
The question is where are these settings (default) are stored not how to get them. I cannot debug the code because is using AbpBoilerplate dll.
Thanks
-
0
@antonis default setting values are not stored in database. They are defined with the setting itself in the code. The setting values in the database overrides default values defined in the code.
That's why I suggested to insert values to the database (AbpSettigs table) for changing setting defaults. This is an example setting with a default value <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Timing/TimingSettingProvider.cs">https://github.com/aspnetboilerplate/as ... rovider.cs</a>.
-
0
<cite>ismcagdas: </cite> This is an example setting with a default value TimingSettingProvider.cs.
@antonis As for security settings, they are in AbpZeroSettingProvider.cs.
-
0
<cite>ismcagdas: </cite> @antonis default setting values are not stored in database. They are defined with the setting itself in the code. The setting values in the database overrides default values defined in the code.
That's why I suggested to insert values to the database (AbpSettigs table) for changing setting defaults. This is an example setting with a default value <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp/Timing/TimingSettingProvider.cs">https://github.com/aspnetboilerplate/as ... rovider.cs</a>.
I have already done that. I just want to know where are the default values defined in the code?
-
0