I am working on some security integration (Ki/wicket), and am looking
at a general way to set component visibility based on the user
permissions/roles etc.
Of course I could do: component.setVisible( false ), but that gets
really verbose when 'false' can be a rather long statement.
Wicket-auth-roles uses the authorize actions annotation to disable
"RENDER/ENABLE"
I understand how to apply that if I construct a class with the
annotation, but how would I apply something like that to an arbitrary
component?
Could this be implemented with a Behavior?
Perhaps, beforeRender() could set enabled/visibility and cleanup()
would restore it?
It would be great to be able to do:
WebMarkupContainer stuff = new WebMarkupContainer( "stats" );
stats.add( new AuthorizationConstraint( "view: stats" );
or something like that.
Any pointers? Am I missing another preferred way to do this?
thanks
ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]