Config tab missing for "global read" role (radius auth)

I noticed that the Config tab is not shown for users with the global-read role. I found if I change the following I can get it to show, not sure if this was by design, or just an oversight.

app/Http/Controllers/Device/Tabs/ShowConfigController.php calls:

phpauth()->user()->can(‘show-config’, $device)

Fix — change to:
phpauth()->user()->can(‘showConfig’, $device)

Then in /app/Providers/AppServiceProvider.php

The global-read role is only granted abilities matching /^(\S+.)?view(All|Any)?$/, which does not include showConfig.

Fix — change the regex to:

phppreg_match(‘/^(\S+.)?(?:view(?:All|Any)?|showConfig)$/’, $ability, $match)

You’ll break updates doing that.

Use the new Roles / permissions functionality.

I will give it a go, thank you!

Oh the new Roles / Permissions are nice! I was putting in some nasty hacks so non-admins could show configs and search Oxidized. Not needed now. Awesome!