tags icon indicating copy to clipboard operation
tags copied to clipboard

Order of CP navbar items changing for non admin users

Open krizzzly opened this issue 5 years ago • 1 comments

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

krizzzly avatar Nov 02 '20 07:11 krizzzly

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)

ghost avatar Nov 02 '20 11:11 ghost