Created
February 26, 2013 20:44
-
-
Save AdamSaleh/5041999 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
([] (login *session-user* *session-password* {:org *session-org*})) | |
([username password & [{:keys [org default-org]}]] | |
(when (logged-in?) (logout)) | |
(sel/fill-ajax-form {::username-text username | |
::password-text password} | |
::log-in) | |
(let [retval (notification/check-for-success {:timeout-ms 20000}) | |
direct-login? (some (fn [n] (or (= "Login Successful" n) | |
(re-find #"please contact administrator" n) | |
(re-find #"logging into" n))) | |
(mapcat :notices retval))] | |
;; if user only has access to one org, he will bypass org select | |
(if direct-login? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment