How to check if the user has permission in the pyramid. For example, I want to show some HTML only if the user has some permission, but has access for everyone.
The usual method:
from pyramid.security import has_permission has_permission('view', someresource, request)
See also http://docs.pylonsproject.org/projects/pyramid/1.0/narr/security.html#debugging-imperative-authorization-failures and http://docs.pylonsproject.org/projects/pyramid/1.0/api /security.html#pyramid.security.has_permission