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 <[email protected]> wrote:
> 
> 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 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 [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/pylons-discuss/f422ce38-287d-4b53-b95e-5c114ed8e65a%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/pylons-discuss/f422ce38-287d-4b53-b95e-5c114ed8e65a%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/50EEE623-4776-4E00-A8AA-6E6613C2E2E5%40luhn.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to