Comments (6)
Hi @wakuflair,
I think we don't need Permission
field. We already know the group and setting name at runtime. We can implement this as default behaviour. If user define permission like SettingUiPermissions.Tenant.GroupName.SettingName we can automatically check this at runtime. If user dont define this permission we can pass and show specified setting on the UI.
For example, we have 2 different groups and 4 different setting for each group. We can write like this. (spaghetti code)
var moduleGroup = context.AddGroup(SettingUiPermissions.GroupName, L("Permission:SettingUi"));
var root = moduleGroup.AddPermission(SettingUiPermissions.Tenant, L("Permission:SettingUi.Tenant"));
var group1 = root.AddChild(SettingUiPermissions.Tenant + ".Group1", L("Permission:SettingUi.Tenant.Group1"));
group1.AddChild(SettingUiPermissions.Tenant + ".Group1" + ".Setting1"); // If the user has this permission, show the specified setting
//group1.AddChild(SettingUiPermissions.Tenant + ".Group1" + ".Setting2"); always show
//group1.AddChild(SettingUiPermissions.Tenant + ".Group1" + ".Setting3"); always show
group1.AddChild(SettingUiPermissions.Tenant + ".Group1" + ".Setting4"); // If the user has this permission, show the specified setting
var group2 = root.AddChild(SettingUiPermissions.Tenant + ".Group2", L("Permission:SettingUi.Tenant.Group2"));
//group2.AddChild(SettingUiPermissions.Tenant + ".Group2" + ".Setting1"); always show
//group2.AddChild(SettingUiPermissions.Tenant + ".Group2" + ".Setting2"); always show
//group2.AddChild(SettingUiPermissions.Tenant + ".Group2" + ".Setting3"); always show
group2.AddChild(SettingUiPermissions.Tenant + ".Group2" + ".Setting4");// If the user has this permission, show the specified setting
from abp.settingui.
I can PR for this. :)
from abp.settingui.
Sure, I will look at it ASAP.
from abp.settingui.
Sounds a good idea!
I will take a closer look, thank you @cihangll
from abp.settingui.
Hi @wakuflair ,
Can you check this PR for this?
from abp.settingui.
Resolved with #46
from abp.settingui.
Related Issues (20)
- Complete the missing localizations HOT 3
- Supplement the documentation for setting permissions
- Projects should be depend on SettingUiApplicationContractsModule HOT 2
- Release new version HOT 3
- The ABP commercial setting management reference this module throw an exception HOT 1
- KeyNotFoundException: The given key 'Group1' was not present in the dictionary. HOT 6
- 升级到abp 4.2.2跑不起来
- Cannot compact with the setting management page for abp commercial 4.3.0-rc.1 HOT 1
- 不知道发生了什么,我的abp是4.2.2的mvc 分层的那种,请大佬指点,我是按照配的,各个模块都已经注入了。 HOT 2
- Admin can be locked out
- How to Remove Existing "Emailing" Settings? HOT 2
- Does it support Blazor server UI? HOT 4
- Not compatible with version 6.0.2? HOT 2
- Localizable strings for setting groups HOT 3
- Perform setting save validation HOT 3
- 设置布尔类型的时候,会报错
- 本地调试可以,部署后swagger正常,但是页面访问不了
- Upgrade abp version to 6.0.1 HOT 1
- Basic Theme NullReferenceException HOT 5
- 大佬,有计划升级到abp7.0吗? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abp.settingui.