there seems to be a bit of a disconnect between "render" in auth and our general component visibility concept. perhaps it might be an improvement to aligh auth strategy with visibility rather then render...what do others think?
-igor On 10/31/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: > Hi, > > OK, figured it might be something like this! > Thanks for the fast reply. :-) > > Regards, > Sebastiaan > > Igor Vaynberg wrote: > > enclosures work on the visibility level, not render level. since your > > adminlink is visible, but its rendering is aborted the enclosure still > > shows the content. > > > > to do this you have to put the link into a webmarkupcontainer, and > > authorize that container instead of a link. > > > > -igor > > > > > > On 10/31/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote: > >> Hi, > >> > >> I have a main menu with an admin link which only renders when the user > >> has the "ADMIN" role (MainMenu.java): > >> > >> final BookmarkablePageLink adminLink = new > >> BookmarkablePageLink("adminLink", AdminHomePage.class); > >> MetaDataRoleAuthorizationStrategy.authorize(adminLink, RENDER, "ADMIN"); > >> add(adminLink); > >> > >> In my MainMenu.html I have: > >> > >> <wicket:enclosure id="adminLink"> > >> <li> > >> <a wicket:id="adminLink">Administratie</a> > >> </li> > >> </wicket:enclosure> > >> > >> I was hoping that when the admin link is not rendered due to the user > >> not having the proper role, that the <li></li> would also not be > >> rendered, however, it does not seem to work this way... > >> > >> Is this not the way I'm supposed to do this? Or should this work? > >> Otherwise, what is the right way to go about this? > >> > >> Thanks in advance, > >> Sebastiaan > >> > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]