Results 1 to 3 of 3

Thread: RESTfull url

  1. #1

    Default 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. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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

  3. #3
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •