Do not allow users to leave from certain group
-
I'm using several groups that gradually guarantee more and more privileges. Each group is reached after a certain number of posts.
They are groups in which you are automatically added or removed by the system, you cannot choose to accept or reject.
The problem is that at the moment there is no way to prevent a user from leave a group.
I wanted to use the hook'action: group.leave'
and then re-add the user after its call, but this solution could create a circularity that I don't like.
example: If an admin wants to delete a user from the group, he could not do it, because this hook does not provide information on who was doing the action, then it continues to re-add a user despite any privilege.
I think there is to use the same solution used for registrations, under the check mark
"disable join request" can be good to have "disable leave request" -
It's already been added some time ago and will be in 1.13.0:
https://github.com/NodeBB/NodeBB/commit/1796b65d34e5762e95e1bd305d3bc90983059811
The original issue on GitHub:
https://github.com/NodeBB/NodeBB/issues/7770