Ticket #2172 (closed enhancement: invalid)
Create a function that checks if the user is allowed to visit a given URL
| Reported by: | Gustavo | Owned by: | Gustavo |
|---|---|---|---|
| Priority: | high | Milestone: | 2.0b6 |
| Component: | TurboGears | Version: | trunk |
| Severity: | major | Keywords: | repoze.what |
| Cc: |
Description
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.
Change History
comment:1 Changed 3 years ago by Gustavo
- Status changed from new to assigned
- Type changed from task to enhancement
comment:3 Changed 3 years ago by Gustavo
- Status changed from assigned to closed
- Resolution set to invalid
This will eventually be implemented in repoze.what-pylons: http://bugs.repoze.org/issue61
Note: See
TracTickets for help on using
tickets.