From 3f24824f66a3b9b46397e914a8f1b955b9e68cdd Mon Sep 17 00:00:00 2001 From: "Mark St. Godard" Date: Sun, 4 Sep 2005 20:09:56 +0000 Subject: [PATCH] updated config, added switchUserProcessingFilter to the filter chain, added the ROLE_SUPERVISOR the ability to switch to other users (i.e. ROLE_USER) For example: 'marissa' can login, goto the /switchUser.jsp, then assume the role of another user such as 'scott'. marissa will then see scotts contacts, etc. Then marissa can goto the /exitUser.jsp, and go back to 'marissa' This is the similar to the Unix 'su' analogy that Ben made --- .../filter/WEB-INF/applicationContext-acegi-security.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/samples/contacts/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml b/samples/contacts/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml index 21998fa39f..acd4955451 100644 --- a/samples/contacts/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml +++ b/samples/contacts/src/main/webapp/filter/WEB-INF/applicationContext-acegi-security.xml @@ -21,7 +21,7 @@ CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT - /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,basicProcessingFilter,rememberMeProcessingFilter,anonymousProcessingFilter,securityEnforcementFilter + /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,basicProcessingFilter,rememberMeProcessingFilter,anonymousProcessingFilter,securityEnforcementFilter,switchUserProcessingFilter @@ -174,6 +174,8 @@ /index.jsp=ROLE_ANONYMOUS,ROLE_USER /hello.htm=ROLE_ANONYMOUS,ROLE_USER /logoff.jsp=ROLE_ANONYMOUS,ROLE_USER + /switchuser.jsp=ROLE_SUPERVISOR + /j_acegi_switch_user=ROLE_SUPERVISOR /acegilogin.jsp*=ROLE_ANONYMOUS,ROLE_USER /**=ROLE_USER @@ -182,11 +184,12 @@ + /j_acegi_switch_user /j_acegi_exit_user - /secure/index.htm + /acegi-security-sample-contacts-filter/secure/index.htm