[Bese-devel] require a login

Marco Baringer mb at bese.it
Fri Oct 28 13:26:00 UTC 2005


Jan Rychter <jan at rychter.com> writes:

> Simple question: how do you require a login into your application?

there other option, which is a bit longer (requires more wrapper
component) nice if you have many entry points, is something like this:

;; setup a task component which always requires a login

(defcomponent my-generic-task (task-component)
  ())

(defmethod start :before ((task my-generic-task))
  (call 'login))

;; each entry-point calls a task component which hands control off to
;; the actual worker components.

(defcomponent statistics (my-generic-task)
  ()
  (:entry-point "stats.ucw" ()))

(defmethod start ((s statistics))
  ;; stats-menu is the "real" component with the home page, the navbar, etc.
  (call 'stats-menu))

hth.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list