Is there support for Data Permission? #6228
AspnetZero has support for permissions for users and role. This is useful to hide functionality from certain users or group of users (roles)).
My question is how can I use this to also hide or show data.
For example: If I have a Cities database, and I want to be able to say this user can only view these cities, or this role can only view these cities, so that when I query the DB it filters based on the roles and/or user. Is there an easy way to implement this in AspnetZero or to hook into the current perrmission system but use it for data filtering?
The current permission system is what you see now. https://aspnetboilerplate.com/Pages/Documents/Authorization
Simple implementation: The user or role is associated with the city. You can get the city information of the current user and role after the authorization check is passed, and then filter the city data.
I think the code should not be too complicated after optimization.