Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2172 (closed enhancement: invalid)

Opened 10 years ago

Last modified 10 years ago

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 10 years ago by Gustavo

  • Status changed from new to assigned
  • Type changed from task to enhancement

comment:2 Changed 10 years ago by mramm

  • Milestone changed from 2.0b5 to 2.0b6

comment:3 Changed 10 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.