Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of CP navbar items changing for non admin users #15

Open
krizzzly opened this issue Nov 2, 2020 · 1 comment
Open

Order of CP navbar items changing for non admin users #15

krizzzly opened this issue Nov 2, 2020 · 1 comment

Comments

@krizzzly
Copy link

krizzzly commented Nov 2, 2020

for some reason, non admin users dont have "dashboard" in first place after installing your plugin.

Bildschirmfoto 2020-11-02 um 08 36 21

uncommenting: vendor/ether/tags/src/TagManager.php:156-158 helps

@ghost
Copy link

ghost commented Nov 2, 2020

I guess there are two options:

It could check for permission:

if(Craft::$app->user->checkPermission('tag-manager')) {
    	Event::on(
    		Cp::class,
    		Cp::EVENT_REGISTER_CP_NAV_ITEMS,
    		[$this, 'onRegisterCpNavItems']
    	);
}

But imo a better solution would be that the plugin shouldn't mess with the menu order in the first place. It can't account for plugins or custom modules which order or customise the menu. (Granted.. Craft doesn't really give enough control on this)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant