-
-
Save bhenry/44e29ca0118cc3910b08 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Brown, Sylvia (sbrown) | |
Brown, Nathan (wnkb) | |
Brown, Araina (arabrown) | |
Brown, Audrey (abrown) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defremote list-subordinate-users [show-inactive] | |
(let [cu (current-user)] | |
(schema/list-subordinate-users (:subordinate-groups cu) | |
show-inactive | |
(admin? cu)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn list-subordinate-users [subs & [show-inactive show-all]] | |
(select employee | |
(fields :id :firstname :lastname :username) | |
(where (if-not show-all | |
{:id [in (subselect | |
employee-group | |
(fields :employee_id) | |
(where {:group_id [in (map :id subs)]}))]} | |
{:id [> 0]})) | |
(order :lastname :asc :firstname :asc :username :asc))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment