Thursday 15 May 2014

Permissions on specific elements in a page in pyramid-python -



Permissions on specific elements in a page in pyramid-python -

in pyramid, can set permissions on entire views. i'm trying find way display single element within view different permissions. example, if have page has lot of info person, such profile page, want display element allows user modify info on page, long user in specified group.

can 1 view or have create new view each level of authentication (or group) has different elements on page?

use request.has_permission imperatively:

if request.has_permission('edit', context): ... render template or somehow include ui in current view's template ... else: .. dont ...

python pyramid

No comments:

Post a Comment