[NEW] Add leave public channel & leave private channel permissions#9584
[NEW] Add leave public channel & leave private channel permissions#9584rodrigok merged 8 commits intoRocketChat:developfrom
Conversation
| { _id: 'edit-room', roles : ['admin', 'owner', 'moderator'] }, | ||
| { _id: 'force-delete-message', roles : ['admin', 'owner'] }, | ||
| { _id: 'join-without-join-code', roles : ['admin', 'bot'] }, | ||
| { _id: 'leave-c', roles : ['admin', 'user', 'bot', 'anonymous'] }, |
There was a problem hiding this comment.
My only concern with doing this is for servers which have custom roles setup. I almost think we need to have a migration to ensure this gets added to all roles on the server except for guest. This way server administrators are forced to disable a person's ability to leave a channel manually instead of a new "odd behavior" happening.
Also, do you think we should create this for private groups as well? 🤔
|
Hi Bradley (@graywolf336 ), I have tried to write a migration for the same. Also, I think we should create the same for private channels as well. Should I proceed with that? If yes, in a separate PR or this one only? Thanks |
|
I will look into that, although if memory serves me correct then that is the expected behavior of the migrations. Go ahead and add it for private channels as well, but keep it in this same pull request. :) |
|
@graywolf336 |
|
When testing migrations you'll have to edit the DB and set to previous migration version so your migration will rerun. Kind of tedius. But that's the only way to run it again |
|
@geekgonecrazy |
|
It should be. As long as your migration returns and stuff like its supposed to it should be fine. That's why we update the version and lock it to prevent a migration from running twice |
|
Hey there. Are there any news regarding this topic? For our company it is vital to force employees staying in some channels. With that we want to ensure that our employees receive important information. Looking forward to hearing from you guys. |
|
This should be merged with #7268 |

@RocketChat/core
This PR adds a permission "leave-c" which if not present, prevents a user from leaving a public channel.
By default: Everyone is allowed, except guests.
Closes #7268