Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0 final
    • Fix Version/s: 2.4-M1
    • Component/s: Scaffolding
    • Labels:
      None

      Description

      Controllers that are generated by scaffolding at run-time do not pay any attention to the allowedMethods, but controllers with allowedMethods explicitly set (even if the rest is scaffolded) do abide by the method restrictions.

      To replicate:
      1. Create a new app, add a Book domain class, and a scaffolded Book controller.
      2. Run the app and go to /[newApp]/book/delete/5
      2a. The expected behavior is a 405 error, since issuing a GET to the delete action is not allowed
      2b. The observed behavior is that the browser is redirected to the list action and a message indicating that a Book with an id of 5 could not be found.
      3. Generate the book controller
      4. Go to /[myApp]/book/delete/5
      4.a Observed behavior is a 405 error returned, which is expected.

      Having the scaffolding not follow this makes the scaffolding much less useful, especially for applications that want to behave correctly (including REST applications)

        Issue Links

          Activity

          Hide
          Peter Ledbrook added a comment -

          I'm moving this into the REST super-issue because it is related to the REST scaffolding feature request.

          Show
          Peter Ledbrook added a comment - I'm moving this into the REST super-issue because it is related to the REST scaffolding feature request.
          Hide
          Jeff Scott Brown added a comment -

          I think that the compile time support which is being added to resolve GRAILS-8426 is going to fix this.

          Show
          Jeff Scott Brown added a comment - I think that the compile time support which is being added to resolve GRAILS-8426 is going to fix this.

            People

            • Assignee:
              Jeff Scott Brown
              Reporter:
              cdeszaq
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development