Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rojalin Patri
User is able to delete the page even after session time out..
October 11, 2011 1:25 AM
Answer

Rojalin Patri

Rank: Expert

Posts: 287

Join Date: March 22, 2011

Recent Posts

Hi All,
found something unusual in LF6.0.6.User/admin is able to delete the page even after session expires.
Steps to reproduce
1.Add a page 'xyz' in Liferay .
2.wait till the session expires,then mouse hover on that page.click on the X button of the newly created page.it shows a pop-up message asking for confirmation.
3.Upon clicking on "OK" it's deleting the page and the page is no more visible.
4.But if the user logs in again or refreshes the page the 'xyz' page reappears.
This implies it's not really deleting the page once the session expires.but then why it's showing the confirmation message??????is it a bug in liferay or it's the expected behavior???????
if this is the expected behavior,can anyone give me some idea what is the logic behind it??????? and how can i get rid of this.....
I am attaching the screen shots in sequence for reference.
Thanks
Rojalin
Attachment

Attachment

Attachment

Attachments: $62B1F930F18017E8.jpg (16.9k), $6BDCAC29114D716E.jpg (16.8k), $FCF4887C35B96E2.jpg (11.8k)
Ravi Kumar Gupta
RE: User is able to delete the page even after session time out..
October 11, 2011 1:32 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1254

Join Date: June 23, 2009

Recent Posts

I don't think that is a bug or something.. and when you say its deleting.. its just UI change that Liferay might be doing, but because session is expired, user is no longer in position to delete the page, at the backend page is not deleted and reappears.
Ravi Kumar Gupta
RE: User is able to delete the page even after session time out..
October 11, 2011 1:33 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1254

Join Date: June 23, 2009

Recent Posts

To modify it like.. it should not even show confirm box or delete from UI then try checking for session and put the proper logic in JSPs.
Rojalin Patri
RE: User is able to delete the page even after session time out..
October 11, 2011 1:42 AM
Answer

Rojalin Patri

Rank: Expert

Posts: 287

Join Date: March 22, 2011

Recent Posts

Hi Ravi,
thanks for the reply.actually i am running the LF6.0.6 CE bundle.i haven't done any customization in the bundle.this UI change is happening in default bundle only.so i thought it could be a bug in UI . could you please tell me the jsp file i should modify to get rid of this UI problem.
Thanks
Rojalin
Ravi Kumar Gupta
RE: User is able to delete the page even after session time out..
October 11, 2011 3:48 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1254

Join Date: June 23, 2009

Recent Posts

hmm.. its right that this might be there by default. If you want to change that behavior then there is one simple thing that you can do.. check if user session is expired and then when you mouseover then X should not appear.

Check session.js and navigation.js in webapps\ROOT\html\js\liferay. See navigation.js for
1var TPL_DELETE_BUTTON = '<span class="delete-tab aui-helper-hidden">X</span>';


See this as well
 1
 2if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-this-page'))) {
 3                            var data = {
 4                                cmd: 'delete',
 5                                doAsUserId: themeDisplay.getDoAsUserIdEncoded(),
 6                                groupId: themeDisplay.getScopeGroupId(),
 7                                layoutId: tab._LFR_layoutId,
 8                                privateLayout: themeDisplay.isPrivateLayout()
 9                            };
10....


In this code, you need to put logic to get Liferay.session and check if that's expired or not...

I hope that helps..