How to modify UI and functionality depending on user authorization rules? #16948
Replies: 4 comments 1 reply
-
@xperiandri just a quick thought, maybe using a Converter that converts the Role to |
Beta Was this translation helpful? Give feedback.
-
Or maybe an Attached Property that you set on the elements in question. Something like Then set the Visibility of the element that has RequiredRoles attached depending on if the Role is included in the defined list |
Beta Was this translation helpful? Give feedback.
-
I would really like to know how this is done as well. It appears that there are zero established components around this and it's rather unclear what the recommended pattern is to hide/show interface elements based on the user's claims/scopes/roles/etc. 🤔 |
Beta Was this translation helpful? Give feedback.
-
In ASP.NET Core and Blazor we have
Authorize
attribute andIAuthorizationService
which allow to display or hide of some pieces of UI depending on the user role, or policy, or permission.IAuthorizationService
also allows performing authorization on a particular resource (object)What approach can I use in Uno Platform?
For instance, I have a
NavigationView
and its items bust be different for different roleBeta Was this translation helpful? Give feedback.
All reactions