English 中文(简体)
页: 1
原标题:Spring 3.0 Different Success pages for each role [duplicate]
This question already has answers here:
Closed 11 years ago.

Possible Duplicate:
determine target url based on roles in spring security 3.1

Hello all I was wondering if anyone knew of any way to specify different Success pages for different roles using spring security 3.0. I have an ROLE_ADMIN and a ROLE_USER that should each be directed to different success pages upon login.

最佳回答

春季安全等级表也适用。 见。 基于春天安全作用的目标 3.1

问题回答

你可以有一个单一的成功页,进行安全检查以确定所显示的内容。

E.g.

<security:authorize ifAnyGranted="ROLE_ADMIN">
<fmt:message key="welcomemessageadmin" />
</security:authorize>

<security:authorize ifAnyGranted="ROLE_USER">
<fmt:message key="welcomemessageuser" />
</security:authorize>




相关问题
array dependency injection in spring?

is there a way to use dependency injection to inject all available implementations of a specific interface in spring? This is kind of the same thing as asked here for .NET. Though my aim is to use @...

Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

How can I determine Objects in application context?

I am trying to write a portlet for Liferay (using Tomcat and Spring) and need to use a database via Persistence API/Hibernate. I am using some configuration XMLs (applicationContext.xml, etc.) and ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签