Foren

User is able to delete the page even after session time out..

thumbnail
Rojalin Patri, geändert vor 12 Jahren.

User is able to delete the page even after session time out..

Expert Beiträge: 287 Beitrittsdatum: 22.03.11 Neueste Beiträge
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
thumbnail
Ravi Kumar Gupta, geändert vor 12 Jahren.

RE: User is able to delete the page even after session time out..

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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.
thumbnail
Ravi Kumar Gupta, geändert vor 12 Jahren.

RE: User is able to delete the page even after session time out..

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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.
thumbnail
Rojalin Patri, geändert vor 12 Jahren.

RE: User is able to delete the page even after session time out..

Expert Beiträge: 287 Beitrittsdatum: 22.03.11 Neueste Beiträge
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
thumbnail
Ravi Kumar Gupta, geändert vor 12 Jahren.

RE: User is able to delete the page even after session time out..

Liferay Legend Beiträge: 1302 Beitrittsdatum: 24.06.09 Neueste Beiträge
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
var TPL_DELETE_BUTTON = '<span class="delete-tab aui-helper-hidden">X</span>';


See this as well

if (confirm(Liferay.Language.get('are-you-sure-you-want-to-delete-this-page'))) {
							var data = {
								cmd: 'delete',
								doAsUserId: themeDisplay.getDoAsUserIdEncoded(),
								groupId: themeDisplay.getScopeGroupId(),
								layoutId: tab._LFR_layoutId,
								privateLayout: themeDisplay.isPrivateLayout()
							};
....


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

I hope that helps..