Permissions on specific elements in a page in pyramid-python -
In the pyramid, you can set permission on the entire sequence. I am trying to find a way to display any one element with different permissions. For example, if I have a page in which there is a lot of data about a person, such as profile page, I want to display an element that allows the user to modify the information on that page, as long as The user is not specified in the group.
Can I do this with a view or will I have to create a new view for each level of authentication (or group), on which different elements exist on the page?
use request.has_permission
imperatively:
< Code> if request.has_permission ('edit', context): ... Render some templates or somehow include UI in the template of current view ... and: ..no ...
Comments
Post a Comment