Hi,

On Wed, Sep 8, 2010 at 2:01 PM, Jochen Daum <jdau...@gmail.com> wrote:
> Hi all,
>
> I have a backend application with various access cerdentials for a
> variety of modules.
>
> I'd like to build a navigation list, which should obviously be
> adjusted depending on what access rights you have. Is there a
> reasonably easy way to find out if the current user can access a
> route? If it is easier, it may be sufficient to figure out if the user
> has rights to "index"

Solved this myself with:

$action = sfContext::getInstance()->getController()->getAction($module,
'index');
$sec = $action->getSecurityConfiguration();

if(sfContext::getInstance()->getUser()->hasCredential($sec['all']['credentials'])){

HTH, Jochen

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to