25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Revert "Affiliations other than admin and owner cannot invite to members_only rooms"

This reverts commit b010a1a0a0.
More details in #2987
This commit is contained in:
Badlop 2019-08-13 14:55:37 +02:00
parent a157e22c2f
commit 0bb14bdc0b

View File

@ -4410,8 +4410,7 @@ send_voice_request(From, Lang, StateData) ->
ok | {error, stanza_error()}. ok | {error, stanza_error()}.
check_invitation(From, Invitations, Lang, StateData) -> check_invitation(From, Invitations, Lang, StateData) ->
FAffiliation = get_affiliation(From, StateData), FAffiliation = get_affiliation(From, StateData),
CanInvite = ((StateData#state.config)#config.allow_user_invites CanInvite = (StateData#state.config)#config.allow_user_invites orelse
and not (StateData#state.config)#config.members_only) orelse
FAffiliation == admin orelse FAffiliation == owner, FAffiliation == admin orelse FAffiliation == owner,
case CanInvite of case CanInvite of
true -> true ->