Stop ICN onLogout event

188 Views Asked by At

I have a requirement wherein, I need to stop user logging out from ICN based on certain condition i.e. if a user is on a specific page of a custom plugin and then clicks on Logout, I need to stop log out event and alert the user. Tried using desktop onLogout event and was able to bring the alert but couldn't stop the icn being logged out. Please help.

1

There are 1 best solutions below

0
On

The desktop.onLogout is indeed only triggered after logout.

ecm.widget.layout.CommonActionsHandler#actionLogOut is what you're looking for.

Using aspect.around would enable you to alert, cancel and postpone the actual action.

Related jsdoc: https://www.ibm.com/support/knowledgecenter/en/SSEUEX_2.0.1/com.ibm.developingeuc.doc/doc/JavaScriptdoc/symbols/ecm.widget.layout.CommonActionsHandler.html#actionLogOut