Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Container authentication and Struts

 
Hanna Habashy
Ranch Hand
Posts: 532
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My action class extends LookupDispatchAction class.
Assume the class implements readAction() and updateAction().

How can I configuer the DD so that some users can read and some users can update?

In the DD:

<web-resources-name>someName</web-resource-collection>
<url-pattern>/user/*</url-pattern>

The <url-pattern> specify the url to the action class, and not a method.
Is there anywhay of configuering this declerativly?

Thanks
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An action mapping has a "roles" attrubute that you can use to assign which roles defined in the container have access to this action. So, as long as you use a separate action mapping when you intend to call either readAction or updateAction, you can define different roles for each. To me it would still make more sense to put each method in its own Action class since you have to define a separate mapping for each anyway.
[ March 21, 2007: Message edited by: Merrill Higginson ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic