Hi,

you can do it using your IAuthorizationStrategy:

IAuthorizationStrategy as =
Application.get().getSecuritySettings().getAuthorizationStrategy();
as.isInstantiationAuthorized(Page.class);



On Thu, Dec 7, 2017 at 10:08 AM, Martin Nielsen <mny...@gmail.com> wrote:

> Hello everyone.
>
> I have been looking through this guide:
> https://ci.apache.org/projects/wicket/guide/6.x/guide/security.html
> I am currently trying to implement the AnnotationsRoleAuthorizationStrategy
> but
> I have a followup question.
>
> I would like to create a navbar with Links which disable themselves if the
> page they link to is not allowed for the logged in user. I am guessing i
> need to create a subclass of Link for this case.
> So what i need is some way to ask Wicket if a page is allowed based on its
> class alone.
> Is there a method along the lines of isAllowed(Class<? extends Page>)
> somewhere?
>
> Or does anyone have a different idea of accomplishing this?
>
>
> Thank you
>
> -Martin
>

Reply via email to