projects
/
rrq
/
hourglass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixes for deployment conf
[rrq/hourglass.git]
/
manager
/
basic_login.lsp
diff --git
a/manager/basic_login.lsp
b/manager/basic_login.lsp
index 7231ef0e0e7f7b3b62d4f5965a3655dafd7d5497..f491a9eee47ead9952defe603dd782c9f6792e76 100644
(file)
--- a/
manager/basic_login.lsp
+++ b/
manager/basic_login.lsp
@@
-30,16
+30,14
@@
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
(write-line 1 (read-file "tmpl/unauthorized.http"))
(exit 0))
-(define (role-script ROLE)
+;; Determine actual script name respecting given role, if any.
+(define (role-script (ROLE "."))
(let ((CMD (and (regex "([^/]*).cgi$" (main-args 0) 0) $1)))
(let ((CMD (and (regex "([^/]*).cgi$" (main-args 0) 0) $1)))
- (if (= "." ROLE) (string CMD ".lsp")
- (format "%s/%s.lsp" ROLE CMD))))
+ (if (= "." ROLE) (string CMD ".lsp") (format "%s/%s.lsp" ROLE CMD))))
(setf
(setf
- ROLES (map (fn (x) (parse x ":")) (parse (read-file "roles.txt") "\n"))
REMOTE_USER (and (regex "([^:]+):" (base64-dec (6 AUTH)) 0) $1)
REMOTE_USER (and (regex "([^:]+):" (base64-dec (6 AUTH)) 0) $1)
- ROLE (or (lookup REMOTE_USER ROLES) "child")
- SCRIPT (role-script ROLE)
+ SCRIPT (role-script)
)
(env "REMOTE_USER" REMOTE_USER)
(env "ROLE" ROLE)
)
(env "REMOTE_USER" REMOTE_USER)
(env "ROLE" ROLE)