mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🐛 Properly redirect to login on unauthorized request.
This commit is contained in:
parent
fa0e0af5b9
commit
420294aef4
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue