qor5 / admin

Admin console

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to display fields based on different permissions?

conku opened this issue · comments

bm.Listing

In Listing, you can hide a field by denying the list permission on this field.
For example:
RoleA is denied to see author field on posts in Listing

perm.PolicyFor(RoleA).WhoAre(perm.Denied).ToDo(presets.PermList).On("*:posts:f_author:*")

FYI, permission doc https://docs.qor5.com/presets-guide/permissions.html

In Listing, you can hide a field by denying the list permission on this field. For example: RoleA is denied to see author field on posts in Listing

perm.PolicyFor(RoleA).WhoAre(perm.Denied).ToDo(presets.PermList).On("*:posts:f_author:*")

FYI, permission doc https://docs.qor5.com/presets-guide/permissions.html

Okay, I've learned. Thank you!