Comment #⁨1⁩

Answer
Toby Toby Waterhole Founder Dec 15, 2023

Welcome @bradders, thank you!

This is not possible out of the box, nor is it on the roadmap, but I think it could be done with some moderate customization leveraging standard Laravel conventions and hooking into Waterhole's permissions system. Off the top of my head, you might:

  • Create a migration to add a nullable user_id column to the channels table, and add a user relationship to the Channel model, so a channel can be "owned" by a user. (Relevant docs: Database)

  • Create a new route + controller + view with a form for users to "create a channel". When submitted, this would create a new Channel model belonging to the authenticated user. (Relevant docs: Routes, Frontend)

  • Add UI that allows users to invite other users to their channel. This could be done by adding a record to Waterhole's permissions table, setting the user as the recipient and the channel as the scope. (Relevant docs: Authorization, Frontend)

  • By default, admins can view everything. If you don't want user-created channels to be visible to uninvited admins, you might need to add a global scope to the Channel model which adds this condition. (The PermittedScope class might give an idea of what this could look like.)

I'm sure there would be a lot of other details to sort out, but hopefully this is a useful overview. Happy to help with any other questions!