Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-450

Secured ViewConfig's are not working as documented

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 0.5
    • None
    • Core, Security-Module
    • None
    • Glassfish 4 / Weld 2.0.4

    Description

      I believe this is the documented method for securing pages, but the following view configuration does not invoke an AccessDecisionVoter.
      @View(navigation = NavigationMode.REDIRECT)
      public interface Pages extends ViewConfig {

      class LogIn implements Pages {}

      @Secured(value = ApplicationAccessDecisionVoter.class, errorView = LogIn.class)
      class Manage implements Pages {}
      }

      I also tried with a @Sterotype @Secured annotation which I've confirmed to be working perfectly when placed on a CDI business method.

      @Retention(RetentionPolicy.RUNTIME)
      @Target(

      {ElementType.TYPE, ElementType.METHOD, ElementType.FIELD}

      )
      @Documented
      @Stereotype
      @Secured(value = ApplicationAccessDecisionVoter.class, errorView = LogIn.class)
      public @interface LoggedIn {
      }

      @View(navigation = NavigationMode.REDIRECT)
      public interface Pages extends ViewConfig {
      class LogIn implements Pages {}

      @LoggedIn
      class Manage implements Pages {}
      }

      Attachments

        1. test.zip
          7 kB
          John Schneider

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            gpetracek Gerhard Petracek
            JohnSchneider John Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment