This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

rafael15889
rafael15889

How I can hide the settings button for an user in the navbar?

jurito
jurito

may i bump this?

ukebako8008
ukebako8008
/**
     * Boot method, called right before the request route.
     *
     * @return array
     */
    public function boot()
    {
        Event::listen('backend.menu.extendItems', function($navigationManager) {
            if (/* check if user can't see Settings menu */) {
                   $navigationManager->removeMainMenuItem('October.System', 'system');
            }
        });
    }
jurito
jurito

that did it! thank you VERY much

dobbler311350
dobbler311350

Sorry, noob question but where do I add this function?

Thanks!

JeffGoldblum
JeffGoldblum

In your plugin's Plugin.php class

Mohsin
Mohsin

What if I wanted to hide just the Customize themes sub menu alone? Any clue how I can achieve that?

Last updated

joseph.d
joseph.d

Yes, I'd also like to know how to remove specific sub-menus in the settings.

As an example, sometimes there are Plugins that don't ship with their own permissions, so their settings appear when any backend user clicks on their avatar and chooses "My account"

leogiovanni27697
leogiovanni27697

joseph.d said:

Yes, I'd also like to know how to remove specific sub-menus in the settings.

As an example, sometimes there are Plugins that don't ship with their own permissions, so their settings appear when any backend user clicks on their avatar and chooses "My account"

I have the same problem, any suggestion ?

Last updated

JeffGoldblum
JeffGoldblum

Are you willing to pay for a plugin to manage the backend menu items leo?

mikoop28841
mikoop28841

This is good. Where can you get a list of Backend Nav items?

I took a guess and swapped out the 'Settings' for 'Cms' to hide the CMS nav item from a type of user.

Last updated

JeffGoldblum
JeffGoldblum

mikoop28841 Don't do that to hide the CMS from a user, just disable the CMS-applicable permissions on their account.

1-12 of 12

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.