You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ron1 <ro...@gmx.net> on 2004/07/15 20:50:39 UTC
How to use roles with Struts
Hi all :-)
I am wondering how some of the experienced users use roles with struts.
I saw there is a query for roles in the API (getRoles()), but could not
figure out how to configure ACLs with struts, or more specific: where to
define which action is allowed for which role, and, and I guess that is
done through Java, how to set the user's role in, for example, after ge
logs in.
My application will use 3 roles, and perhaps an additional admin role:
some actions / pages will have unlimited access ( guest or visitor)
some others will need a log in (user)
and some others will need a privelege (priveleged user).
Could you share your experience?
What I currently imagine as to be a good solution is a Permission
setting on the action configuration (e.g. at struts-config.xml) which
will be automatically checked at the controller instance, and forward
users to login / not permitted pages.
Cheers and thanx advance,
Ron
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org