From 420294aef46bd89f565589d71d9218814509aac2 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 23 Nov 2020 09:48:09 +0100 Subject: [PATCH] :bug: Properly redirect to login on unauthorized request. --- frontend/src/app/main/ui.cljs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/app/main/ui.cljs b/frontend/src/app/main/ui.cljs index fa0ae92d3..0783ebca1 100644 --- a/frontend/src/app/main/ui.cljs +++ b/frontend/src/app/main/ui.cljs @@ -33,6 +33,7 @@ [app.main.ui.workspace :as workspace] [app.util.i18n :as i18n :refer [tr t]] [app.util.timers :as ts] + [app.util.router :as rt] [cuerdas.core :as str] [cljs.spec.alpha :as s] [expound.alpha :as expound] @@ -222,8 +223,10 @@ (defmethod ptk/handle-error :authorization [error] + (st/emit! (rt/nav :login)) (ts/schedule (st/emitf (dm/show {:content "Not authorized to see this content." + :timeout 5000 :type :error})))) (defmethod ptk/handle-error :assertion