Similar to: Dynamic user based authorization in Pyramid
Using URL dispatch, I want to dynamically assign a permission
to a user where the resource
is his/her profile page e.g. /aclark4life:
- Anonymous visitors can access any user profile to see his/her activity.
- Authenticated users can access additional content on their profile page.
I can easily assign a "manage" permission
to all authenticated users, but how do I ensure authenticated users can only view private content on their profile?
E.g. The end result should be only aclark4life can view "Connect to PyPI":
But anonymous viewers cannot: