I use 'request.has_permission' to determine which menu links and
editing buttons to show.
On Wed, Feb 20, 2019 at 9:36 AM Michael Merickel wrote:
>
> Just to expand on Theron's suggestion a bit more: there is not a general
> solution to the problem because Pyramid's routing system is flexible
Many thanks, I eventually found the has_permission and settled on using
that.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Just to expand on Theron's suggestion a bit more: there is not a general
solution to the problem because Pyramid's routing system is flexible enough
that it's not easy to tell which view will be invoked for a particular
request without actually executing the request. If you know what permission
Check out request.has_permission:
https://docs.pylonsproject.org/projects/pyramid/en/latest/api/request.html#pyramid.request.Request.has_permission
— Theron
> On Feb 20, 2019, at 3:10 AM, Thijs wrote:
>
> In a view I want to return a few hyperlinks to other views. However, I don't
> want
In a view I want to return a few hyperlinks to other views. However, I
don't want to present users with links to views they have no permission
for. Is there any way to check if a user has access to a certain view so I
can omit the links to denied views?
--
You received this message because