abp icon indicating copy to clipboard operation
abp copied to clipboard

How to define scoped SettingDefinition?

Open CAH-FlyChen opened this issue 9 months ago • 2 comments

I want design a config ui.I want the flowing code get diffrent count. Because some setting is owned by admin, some by normal user. var cc = await _settingManager.GetAllGlobalAsync(); var dd = await _settingManager.GetAllForCurrentUserAsync();

CAH-FlyChen avatar May 14 '24 07:05 CAH-FlyChen

You can check the document: https://docs.abp.io/en/abp/latest/Settings https://docs.abp.io/en/abp/latest/Modules/Setting-Management

realLiangshiwei avatar May 14 '24 07:05 realLiangshiwei

I've read it all. but all the docuemnt is about how to get the value. and my question is not related to the value, it's related how to define the gloable level key only , whitch not show on the user level.

May be use WithProviders function to define SettingDefinition? or isInherited property of SettingDefinition's ? I had readed the source code, It seems not related with my question. But i found a param "Scope" of SettingDefinition in the old aspnetboilerplate version whitch looks like what I need. And sadly the document is not enouth for the methord.

CAH-FlyChen avatar May 14 '24 07:05 CAH-FlyChen