Skip to content

Commit

Permalink
merge default->testmatcher2
Browse files Browse the repository at this point in the history
--HG--
branch : testmatcher2
  • Loading branch information
Mike Travers committed Aug 27, 2010
2 parents 8965f9b + 0533696 commit 7d38a9d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions session.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Session management, for now, largely copied from our modified BioBike
(get *sessionid* :username))
;; +++ remaining link to wb world
(wb::with-protected-globals-bound *sessionid*
,@body)
(cond ((and (boundp 'wu::*constrained-to-application*) wu::*constrained-to-application*
(string/= wu::*constrained-to-application* (net.aserve::path ,ent)))
(need-to-login-response ,req ,ent wu::*constrained-to-application*))
(t
,@body)))
;; else
(need-to-login-response ,req ,ent ,@(when login-page (list login-page)))
)))
Expand Down Expand Up @@ -54,6 +58,7 @@ Session management, for now, largely copied from our modified BioBike

(defvar *session-variables* ())
(defvar *user*)
(defvar *constrained-to-application*)

(defmacro def-session-variable (name &optional initform)
`(progn
Expand All @@ -62,15 +67,20 @@ Session management, for now, largely copied from our modified BioBike
)
)

(defun init-session (id &optional user)
(defun init-session (id &optional user app-url)
(destructuring-bind (vars vals) (gethash id utils::*saved-variables-hash-table*)
(when user
(push '*user* vars)
(push user vals))
(when app-url
(push '*constrained-to-application* vars)
(push app-url vals))
(loop for (var val) in *session-variables* do
(push var vars)
(push (eval val) vals)
)
(setf (gethash id utils::*saved-variables-hash-table*) (list vars vals))
)
)


0 comments on commit 7d38a9d

Please sign in to comment.