Custom Dashboard
Created 6 years ago by b1gw0rm

I would like to setup a fully customized dashboard for a particular user group. In particular, I'd like to control what they see on the menu. In addition, I'd like them to only be able to add and edit data from certain Streams. I don't want them to see any other Stream options like Fields, Namespaces or the main Stream landing page. What would be the Pyro way to do these things.

ryanthompson  —  6 years ago


When you say "dashboard" do you mean the control panel in general? Or a custom dashboard using the dashboard module.

Either way you can certainly hide / show things based on permissions. Let's hear a little more information and we'll go from there 😊

b1gw0rm  —  6 years ago

In this case I'm referring to the control panel. Ideally I'd like to send a certain user group to a particular custom admin theme but keep the normal Accelerant theme for full admins. However, if it's easier to create one custom admin theme using the artisan make:addon my_client.theme.awesome, with the the admin flag in the Theme.php file, and then using that for all user types, hiding/showing as needed I'm fine to go that route as well.

ryanthompson  —  6 years ago

You can certainly switch the theme based on the user role. Anytime during the boot process (service provider) you can override the streams::themes.admin config value with something like foo.theme.example_admin or whatever you would like the theme to become on that load.

This command is dispatched JUST after all the addons register during the boot process:

Here's where it's fired: