Przeglądaj źródła

fix: clear user info on logout

Konstantinos Kaloutas 3 lat temu
rodzic
commit
16c1e30589

+ 1 - 0
src/main/frontend/handler/user.cljs

@@ -186,6 +186,7 @@
 
 (defn logout []
   (clear-tokens)
+  (state/clear-user-info!)
   (state/pub-event! [:user/logout]))
 
 (defn <ensure-id&access-token

+ 4 - 0
src/main/frontend/state.cljs

@@ -2113,3 +2113,7 @@ Similar to re-frame subscriptions"
     (let [groups (:UserGroups info)]
       (when (seq groups)
         (storage/set :user-groups groups)))))
+
+(defn clear-user-info!
+  []
+  (storage/remove :user-groups))