Announcement Announcement Module
Collapse
No announcement yet.
RESTfull url Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RESTfull url

    Hi,

    Is this possible to define endpoint ( controller ) url by providing some option in command ( new controller automatic ... ) ?
    Next question is : why if I create controller org.example.web.UserController and controller org.example.web.admin.UserController - there is same URL ( /example/user ). Shouldn't be "/example/user" for first controller and "/example/admin/user" for second ?

    I would be happy if there is possibility to define RequestMapping manually or having regard to package name.

  • #2
    Hi,

    Thanks for these suggestions!

    The definition of custom URL mappings via the 'new controller automatic' command is currently not available. But your use case makes sense. We will consider this as a future feature.

    At the moment, your best option is to create two seperate controllers (UserController, UserAdminController) and then disable the functionality you don't want in each of the two controllers (@RooWebScaffoldMetadata([...], remove=false, update=false)).

    Regards,
    Stefan

    Comment


    • #3
      Ah, I almost forgot .

      The most common approach for having different user 'roles' accessing different functionalities in your controller would be to use Spring Security. This way you would only have one controller and then protect the different restful URLs based on the role under which the user operates. To get you started you would install Spring Security:

      Code:
      install security
      -Stefan

      Comment

      Working...
      X