[Seaside] User Toolbar
Sebastian Sastre
ssastre at seaswork.com
Wed Oct 24 13:54:15 UTC 2007
Hi Keith,
I'm not sure what do you mean with "Seaside doesnt handle user state
at all". Any object handle it's state.
I think I would make that the component that should have the toolbar
deduct to render it or not depending on the user (as in fact I made for one
button of a toolbar in an application I made).
Could be something like this:
BlahComponent>>renderContentOn: html
self shouldRenderToolbar ifTrue:[
html render: self toolbar].
...
BlahComponent>>shouldRenderToolbar
^ self session userIsAdmin
BlahSession>>userIsAdmin
^ self user username = 'admin'
cheers,
Sebastian Sastre
> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> de Keith Hodges
> Enviado el: Martes, 23 de Octubre de 2007 23:20
> Para: Seaside - general discussion
> Asunto: [Seaside] User Toolbar
>
> I am wanting to make the toolbar available to my "admin"
> users for my app, but this appears difficult due to the
> current architecture since Seaside doesnt handle user state at all.
>
> any ideas would be appreciated
>
> thanks in advance
>
> Keith
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list