Ok, thanks! At this moment, I will try to use MemoryRealm. My last doubt is: does my application know the user role automatically whenever the login process have finished (role comes together)? Or not, my app should ask for authorization later... So ( automatically option ), the app could choose what view the user will deal with. Thanks Murray.
-----Mensagem original----- De: Murray [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 4 de agosto de 2003 22:26 Para: Tomcat Users List Assunto: RE: Where can i set Groups and user roles? Euclides, Try starting tomcat then look at the examples at http://localhost:8080/tomcat-docs/realm-howto.html. You can assign roles to users based on any of the three realm types but the mechanism is different in each case. I have implemented the JDBC based realm model and have a table in my database which has two columns: user and role. A user may have more than one role in my implementation and I have used the request taglib to ask <req:isUserInRole role="leader"> to determine whether or not to display particular parts of a page. If the user has a row in the table with role set to "leader" access is allowed. Note that I discovered it is essential that all protected pages need to belong to some generic role first before you can gain access to the page to make the test above. Thus, if a user is to pass the above test, he must have at least two entries in the role table: one with "member" and one with "leader". The "member" role permits access to the secure part of the website (as defined in the web.xml snippet below) and the "leader" role provides additional access controls. <security-constraint> <web-resource-collection> <web-resource-name>ScoutGroup-Secure</web-resource-name> <url-pattern>/members/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>member</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> Murray -----Original Message----- From: Jose Euclides da Silva Junior - DATAPREVRJ [mailto:[EMAIL PROTECTED] Sent: Tuesday, 5 August 2003 06:01 To: '[EMAIL PROTECTED]' Subject: Where can i set Groups and user roles? Hi guys, my application should ask for user's authentication and then, associate him to some skills. My question is easy: what is the easiest way to make it possible on TomCat's environment? Is there any xml tag? Thanks in advance, Euclides. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
