Jul 5th, 2009, 12:15 PM
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.
Jul 5th, 2009, 07:45 PM
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)).
Jul 5th, 2009, 07:48 PM
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: