2013-03-26 52 views
2

我使用的Liferay 6.1和创建 正在使用的Liferay登录Portlet我的自定义portlet和我有一些问题,同时登录通过以下几个步骤..如何避免在liferay中从同一浏览器多次登录?

  • 登录与用户1
  • 现已开放不同势与标签相同的URL,这将自动登录到用户1帐户的Liferay
  • 现在从任何标签的退出,然后你也会从两个选项卡TAB1
  • 现在就登入登出W¯¯
  • 现在从两个选项卡第一次登录用USER1从TAB2第i个用户2

现在Liferay将我登录在同一borwser 2个diifrent用户提供不同势标签。(当我刷新页面,将与最后一个用户登录帐户automcatically登陆) 现在我想的是当同一用户尝试登录相同的浏览器,它会自动重定向到用户帐户,其中登录第一个标签..

可以任何身体gudide我该怎么做?

我曾与portlet-ext.properties文件中的一些变化试过但没有如下succeded

live.users.enabled=true 
# 
# Set the following to true if users are allowed to have simultaneous logins 
# from different sessions. This property is not used unless the property 
# "live.users.enabled" is set to true. 
# 
auth.simultaneous.logins=false 

回答

2

发生这种情况是因为浏览器标签通过cookie共享同一个会话。因此,您需要为您的Liferay应用停用Cookie,以便使用同一浏览器进行不同帐户登录。您可以设置以下属性false,默认情况下它们是真实的:

# 
# Set this to false to disable all persistent cookies. Features like 
# automatically logging in will not work. 
# 
session.enable.persistent.cookies=true 

# 
# Set this to true to test whether users have cookie support before allowing 
# them to sign in. 
# 
session.test.cookie.support=true 

如果禁用Cookie的Liferay将使用URL重写维护会话,通过附加JSESSIONID。

我还没有试过这个,但我认为这应该工作。