Should fix most of the authentication issues

This commit is contained in:
2023-09-05 23:08:22 -07:00
parent a6e4080746
commit a56d3b0b84
22 changed files with 506 additions and 179 deletions

View File

@@ -32,7 +32,7 @@
[grid/header-cell {} "Email"]
[grid/header-cell {} "Role"]
[grid/header-cell {} "Clients"]
[grid/header-cell {:style {:width (action-cell-width 1)}}]]]
[grid/header-cell {:style {:width (action-cell-width 5)}}]]]
[grid/body
(for [{:keys [id name role clients] :as c} (:data page)]
^{:key (str name "-" id)}
@@ -50,6 +50,14 @@
[grid/cell {} role]
[grid/cell {} (str/join ", " (map :name clients))]
[grid/cell {}
[:a.button {:on-click (fn []
(.setItem js/localStorage "jwt" (:impersonate-jwt c))
(.removeItem js/localStorage "last-client-id" nil)
(.removeItem js/localStorage "last-selected-clients" nil)
(.reload (.-location js/document ) true))}
"Impersonate"]
[buttons/fa-icon {:event [::form/editing c]
:icon "fa-pencil"}]]])]]
]))