-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add restriction to permissions #8518
Comments
What if I want to add other checks in the future? Add more properties to the PermissionDefinition? We can abstract it, and developers can customize a service to deciding whether this permission is enabled. Feature-management provides a check service, and GlobalFeatures also provides it. Use case: |
@maliming Then you can define an interface, like What about such a design? *name should be thought again :) |
I will give it a try. |
@hikalkan also if you add CanManageFeature property to User/Roles (for decide which users/roles can modify which feature permissions) in this way i guess there may be a solution about that problem #8309 --Update-- |
Add
FeatureName
andGlobalFeatureName
properties toPermissionDefinition
.IFeatureChecker
. If it returns false,PermissionChecker
should return false when we check IsGranted for this permission. Also,PermissionAppService.GetAsync
should not return this permission in the returning list.GlobalFeatureManager
. If it returns false,PermissionChecker
should return false when we check IsGranted for this permission. Also,PermissionAppService.GetAsync
should not return this permission in the returning list.You should also care this on PermissionManager.
Hint: Find usages of
PermissionDefinition.IsEnabled
. You typically mostly changes is same places for checking.The text was updated successfully, but these errors were encountered: