How to disable Applications, etc on the sidebar account?

Hi all

How to disable links on the sidebar in the account manager:

For the example, I would like to disable the links with the red boarder.

In the account/template.ftl file, it looks like, that I can disable and enable them somewhere in the setting:

    <div class="bs-sidebar col-sm-3">
        <ul>
            <li class="<#if active=='account'>active</#if>"><a href="${url.accountUrl}">${msg("account")}</a></li>
            <#if features.passwordUpdateSupported><li class="<#if active=='password'>active</#if>"><a href="${url.passwordUrl}">${msg("password")}</a></li></#if>
            <li class="<#if active=='totp'>active</#if>"><a href="${url.totpUrl}">${msg("authenticator")}</a></li>
            <#if features.identityFederation><li class="<#if active=='social'>active</#if>"><a href="${url.socialUrl}">${msg("federatedIdentity")}</a></li></#if>
            <li class="<#if active=='sessions'>active</#if>"><a href="${url.sessionsUrl}">${msg("sessions")}</a></li>
            <li class="<#if active=='applications'>active</#if>"><a href="${url.applicationsUrl}">${msg("applications")}</a></li>
            <#if features.log><li class="<#if active=='log'>active</#if>"><a href="${url.logUrl}">${msg("log")}</a></li></#if>
            <#if realm.userManagedAccessAllowed && features.authorization><li class="<#if active=='authorization'>active</#if>"><a href="${url.resourceUrl}">${msg("myResources")}</a></li></#if>
        </ul>
    </div>

Thanks

Hi @softshipper,

yeah don’t bother with it. That active check is a Freemarker macro to set a CSS active style class. It just indicates that page as active (blue color in your picture) in the sidebar.

Easiest way is to delete the applications.ftl and totp.ftl pages and remove the menu lines from the template. Removing the menu options is not enough because people could still manipulate the url and access them so delete the pages.

I don’t directly know another way to disable those things, if somebody else knows an alternative I’m happy to hear it.

1 Like