[ 
https://issues.apache.org/jira/browse/DELTASPIKE-988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14791192#comment-14791192
 ] 

Richard DiCroce commented on DELTASPIKE-988:
--------------------------------------------

The motivation for the patch was the need to build menus that hide items the 
user is not allowed to access. In our case, we had several AccessDecisionVoters 
that performed orthogonal checks, and any subset of them might be present in 
the ViewConfig for a given view. There was no place in our application that 
made it easy to perform all of the relevant checks, given an arbitrary view. 
But the ViewConfig already knows about all of the voters, so I just needed to 
be able to invoke them the same way DeltaSpike does in order to find out if a 
user can access a view or not.

However, the requirements for my project changed again, so this patch is no 
longer helpful for us. It may still be worth merging, in whole (if you find the 
above argument persuasive) or in part (for the Secured page tests).

> ViewAccessHandler API
> ---------------------
>
>                 Key: DELTASPIKE-988
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-988
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: JSF-Module
>    Affects Versions: 1.5.0
>            Reporter: Richard DiCroce
>            Assignee: Gerhard Petracek
>
> Currently, there is no way to programmatically evaluate the Secured 
> annotations on a ViewConfig. I have created a PR on GitHub to add such an 
> API. As a bonus, I also added some tests for the Secured/ViewConfig 
> integration.
> PR is here: https://github.com/apache/deltaspike/pull/44



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to