adding power user role.
This commit is contained in:
@@ -51,6 +51,11 @@
|
||||
(log/warn "user " id " not an admin!")
|
||||
(throw-unauthorized)))
|
||||
|
||||
(defn assert-power-user [id]
|
||||
(when-not (#{"power-user" "admin"} (:user/role id))
|
||||
(log/warn "user " id " not an power-user!")
|
||||
(throw-unauthorized)))
|
||||
|
||||
(defn can-see-client? [identity client]
|
||||
(when (not client)
|
||||
(log/warn "WARNING - permission checking for null client"))
|
||||
@@ -72,7 +77,7 @@
|
||||
(= (:user/role id) "admin")
|
||||
nil
|
||||
|
||||
(#{"manager" "user"} (:user/role id))
|
||||
(#{"manager" "user" "power-user"} (:user/role id))
|
||||
(:user/clients id [])))
|
||||
|
||||
(defn result->page [results result-count key args]
|
||||
|
||||
Reference in New Issue
Block a user