What we have implemented is a set of public authorisation methods in our
base action which we call via ognl passing the actionId as the parameter.
For example to test if a user should be shown the print report we have a
isUserAuthorised(Integer actionId) method which we use as follows:
<s:if test="%{isUserAuthorised(123)}">Your stuff in here</s:if>

I have to say that I think this is one of the best aspects of OGNL as
we're easily able to easily use server side authorisation with simple ajax
calls.

Z.

On 30/11/10 5:41 AM, "Biesbrock, Kevin" <biesbrock.ke...@aoins.com> wrote:

>Hello users.  I'm Kevin, first time caller, long time listener (Mr.
>Obvious reference).
> 
>I have two reports and need to display a link for each if the following
>conditions are met:
>    1. The user is authorized to view the reports (they are secured),
>and
>    2. The specific report currently exists
> 
>Both of these conditions are determined via predefined methods (they are
>"black boxes" to me).
> 
>Following the MVC pattern, what is the best way to split up the display
>logic of this such that my links are displaying to the appropriate users
>when they exist?
> 
>The links will display on the home page.  So I thought about determining
>these factors in the home action and wrapping s:if tags around links to
>the reports.  It seems simple enough, I was just curious if there was a
>different and/or better approach.
>____
>Thank you for your time,
>Kevin - "Beez"



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to