You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Seth Weiner <sa...@duke.edu> on 2003/05/26 18:18:42 UTC

use security in velocity macro

Hi,

I'm trying to build a dynamic menu in my top.vm that will show links to
various pages/panes based upon whether the user has security rights to
view that page.  So if there are say 10 pages defined in the
application, a given user might only have the 'view' permission on 5 of
them.  I would then want only 5 links to be displayed to those pages in
my top.vm.  Is there a $security object in the context that would have a
method i could pass a page name or pane name and retrieve the
permissions for the current user?  Something like:
 
$security.checkPermission("apache", "default.psml", "view") 

I think that would pretty much solve my problem.

Thanks in advance,

Seth Weiner
Automated Document Systems, Inc.
1324 Locust Street
Philadelphia, PA

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org