[ 
https://issues.apache.org/jira/browse/DELTASPIKE-718?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gerhard Petracek resolved DELTASPIKE-718.
-----------------------------------------
    Resolution: Invalid

you confirmed the intended behaviour.
with @Secured you can also protect whole folders.
since the class Page inherits the meta-data from interface Main, you get an 
invocation there as well. both invocations aren't the same. one time 
AccessDecisionVoterContext contains the meta-data of the folder and in case of 
the other invocation it contains the meta-data of the page.

> Voter invoked multiple times for nested views
> ---------------------------------------------
>
>                 Key: DELTASPIKE-718
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-718
>             Project: DeltaSpike
>          Issue Type: Bug
>          Components: JSF-Module
>    Affects Versions: 1.0.2
>            Reporter: Ron Smeral
>         Attachments: ds-secured-jsf-reproducer.zip
>
>
> An AccessDecisionVoter of a {{@Secured}} annotation on a ViewConfig is 
> invoked as many times, as is the ViewConfig's depth in the class hierarchy, 
> when the {{@Secured}} is applied on an element higher in the hierarchy.
> As far as I can tell, this is not clear from the documentation. It does not 
> seem like a reasonable behaviour. The expected behaviour would be to invoke 
> the voter only for "leaves" - the actual pages, not for folders.
> Example:
> {code}
> @Folder(name = "/")
> public interface Pages extends ViewConfig {
>     @Secured(LoggedIn.Voter.class)// invoked two times when accessing Page
>     interface Main extends Pages {
>         class Page implements Main {
>         }
>     }
> {code}



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

Reply via email to