25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Allow MUC service admins to bypass max_user_conferences limitation

This commit is contained in:
Badlop 2020-12-10 21:59:07 +01:00
parent fac74f623e
commit 2229e4c6db

View File

@ -2144,11 +2144,11 @@ add_new_user(From, Nick, Packet, StateData) ->
mod_muc_opt:max_user_conferences(StateData#state.server_host),
Collision = nick_collision(From, Nick, StateData),
IsSubscribeRequest = not is_record(Packet, presence),
case {(ServiceAffiliation == owner orelse
((Affiliation == admin orelse Affiliation == owner)
case {ServiceAffiliation == owner orelse
((((Affiliation == admin orelse Affiliation == owner)
andalso NUsers < MaxAdminUsers)
orelse NUsers < MaxUsers)
andalso NConferences < MaxConferences,
andalso NConferences < MaxConferences),
Collision,
mod_muc:can_use_nick(StateData#state.server_host,
StateData#state.host, From, Nick),