Adds manager type, blocks certain permissions
This commit is contained in:
@@ -160,14 +160,17 @@
|
||||
(fn []
|
||||
(let [{transaction-bar-active? :active?} @(re-frame/subscribe [::forms/form ::edit/form])
|
||||
params @(re-frame/subscribe [::params]) ;; Keep to make sure it doens'nt get disposed
|
||||
ap @(re-frame/subscribe [::subs/active-page])]
|
||||
[side-bar-layout
|
||||
{:side-bar [side-bar/side-bar]
|
||||
:main [:div ^{:key approval-status}
|
||||
[content]]
|
||||
:bottom [:div
|
||||
[manual/modal {:import-completed [::manual-import-completed ]}]]
|
||||
:right-side-bar [appearing-side-bar
|
||||
{:visible? transaction-bar-active?}
|
||||
[edit/form {:edit-completed [::edit-completed]}]]}]))}))
|
||||
ap @(re-frame/subscribe [::subs/active-page])
|
||||
user (re-frame/subscribe [::subs/user])]
|
||||
(if (not= "manager" (:user/role @user))
|
||||
[side-bar-layout
|
||||
{:side-bar [side-bar/side-bar]
|
||||
:main [:div ^{:key approval-status}
|
||||
[content]]
|
||||
:bottom [:div
|
||||
[manual/modal {:import-completed [::manual-import-completed ]}]]
|
||||
:right-side-bar [appearing-side-bar
|
||||
{:visible? transaction-bar-active?}
|
||||
[edit/form {:edit-completed [::edit-completed]}]]}]
|
||||
[:div "Not authorized"])))}))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user