2013-03-26 26 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。

我還沒有試過這個,但我認爲這應該工作。