#2172: Create a function that checks if the user is allowed to visit a given URL
------------------------+---------------------------------------------------
Reporter: Gustavo | Owner: Gustavo
Type: task | Status: new
Priority: high | Milestone: 2.0b5
Component: TurboGears | Version: trunk
Severity: major | Keywords: repoze.what
------------------------+---------------------------------------------------
We need a function that receives the path to a controller and returns a
boolean depending on whether the user is allowed to visit that controller
(evaluating the controller-wide predicates (if any) and the predicate
specific to the action via the @require decorator). For example:
{{{
<a py:if="can_access('/admin/')" href="/admin/">
This is a link for admins
</a>
}}}
The can_access() function above represents the function in question.
--
Ticket URL: <http://trac.turbogears.org/ticket/2172>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---