From a29a8fc40f1b741d89cd2ac399506fe49b908548 Mon Sep 17 00:00:00 2001 From: matthew-a-dunlap Date: Fri, 12 Oct 2018 18:06:56 -0400 Subject: [PATCH] clear alert session variable on logout #4842 --- .../edu/harvard/iq/dataverse/DataverseHeaderFragment.java | 1 + src/main/java/edu/harvard/iq/dataverse/DataverseSession.java | 5 +++-- src/main/webapp/dataverse_header.xhtml | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseHeaderFragment.java b/src/main/java/edu/harvard/iq/dataverse/DataverseHeaderFragment.java index dfe6e5e70c9..1fef66664f8 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataverseHeaderFragment.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataverseHeaderFragment.java @@ -217,6 +217,7 @@ private TreeNode getDataverseNode(Dataverse dataverse, TreeNode root, boolean ex */ public String logout() { dataverseSession.setUser(null); + dataverseSession.setStatusDismissed(false); String redirectPage = navigationWrapper.getPageFromContext(); try { diff --git a/src/main/java/edu/harvard/iq/dataverse/DataverseSession.java b/src/main/java/edu/harvard/iq/dataverse/DataverseSession.java index dbb0b128228..7fc80542daa 100644 --- a/src/main/java/edu/harvard/iq/dataverse/DataverseSession.java +++ b/src/main/java/edu/harvard/iq/dataverse/DataverseSession.java @@ -19,6 +19,7 @@ @SessionScoped public class DataverseSession implements Serializable{ + /* Note that on logout, variables must be cleared manually in DataverseHeaderFragment*/ private User user; @EJB @@ -52,8 +53,8 @@ public boolean isStatusDismissed() { return statusDismissed; } - public void dismissStatus() { - statusDismissed = true; //MAD: Set to true to enable code! + public void setStatusDismissed(boolean status) { + statusDismissed = status; //MAD: Set to true to enable code! } public StaticPermissionQuery on( Dataverse d ) { diff --git a/src/main/webapp/dataverse_header.xhtml b/src/main/webapp/dataverse_header.xhtml index 550270b537a..4ef13fcf35f 100644 --- a/src/main/webapp/dataverse_header.xhtml +++ b/src/main/webapp/dataverse_header.xhtml @@ -185,7 +185,7 @@
- +