-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add list:create
permission for multi-tenancy
#2451
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
base: master
Are you sure you want to change the base?
Conversation
- separate permissions for list creation and editing - adds created lists directly to users' list role
Thanks for the PR @dragonwocky.
The issue with this is that all users who have the same list role will end up getting access to the list. |
This works the way I'd want/expect for my use case. The idea of list roles is that two users with the same role will always see the same lists, right? If you didn't want them to get access to the same lists, you'd put them in separate list roles. I don't believe Listmonk has fine-grained enough permissions to give a user access to a list without giving their list role access to it. I could make the behaviour configurable per list role? Edit: Making the behaviour configurable per list role would essentially just be adding a second toggle for the same permission, and it doesn't make sense to allow a user to create a list at all without granting them access to it. a) You don't want users to create lists at all (disable I think documenting this on https://listmonk.app/docs/roles-and-permissions/ should be enough? Alternatively the permissions system could be expanded to give individual users access to a list irrespective of their list role, or implement list role inheritance, but that feels like overkill. |
that really makes sense and would help us a lot! |
I've just pushed a couple more features necessary for my use case. In summary:
@xeruf there are a couple of semi-significant changes here, so in terms of official release depends on @knadh's plans but hopefully 5.1.0? In the meantime I'm using this Dockerfile:
The next thing might to be figure out some sort of scoping or per-user defaults for templates. |
thanks, I think I'll be giving it a try in the course of this month Right now I am still on v4.1.0 and one challenge I have is those same permissions for campaigns - i.e. I cannot give a user access to only own campaigns or of specific lists but maybe that's already solved with v5? |
See #2395.
Separating out list creation from list management permissions allows for proper scoping of list roles, such that users can create and modify as many lists as they want without other users being able to get a look at their lists or subscribers.
When a list is created by a user with a list role, that list is automatically added to their list role. If the user has no list role, then the list is created as normal. A new list role could be created for these users, but I don't think it's necessary. I assume that users will either have a list role, or have the
lists:get_all
permission and not need a list role to see their created list.(As a bonus fix while I was working on this, I've removed the advanced search field from the UI for users without the
subscribers:sql_query
permission.)I've included a database migration with this to add the new permission to existing users. Hope this is helpful and can get merged! Thanks for all your work on this project, of everything I've tried it's stood out best by far.