[Bese-devel] Re: Access Control best practice
Marco Baringer
mb at bese.it
Tue Nov 21 22:33:44 UTC 2006
"Vagif Verdi" <vagif at cox.net> writes:
> But I'd rather not loose RESTfulnes of my application, where users can send
> each other links to particular pages, instead of digging their way to them
> through series of clicks.
you sure you want users to be able to send each other links to the
backoffice?
> Another approach would be (I'm speculating here) assign :before actions to
> parent component, and then derive all components from that component.
> Would that fire :before action for all components that were derived from
> parent component ?
that would be the task component. it calls a start action as soon as
it's rendered so you'd have something like this:
(defcomponent my-app-task/backoffice (task-component)
())
(defmethod start :before ((task my-app-task/backoffice))
(unless (get-session-value 'user) (call 'login)))
(defcomponent product-editor/backoffire (template-component
my-app-task/backoffice)
(...))
(defmethod start ((task product-editor/backoffire))
(let ((product (call 'product-chooser)))
(when (call 'option-dialog :question "Are you sure?")
(update-record-from-instance product))))
or something....this will only work since task-component is designed
to call the start method.
--
-Marco
Ring the bells that still can ring.
Forget your 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