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

Allow an occupant owner/admin to kick lower-affiliation moderator

This commit is contained in:
Badlop 2018-09-25 10:27:17 +02:00
parent 8b61c7fe4b
commit 49f1b4a691

View File

@ -3051,6 +3051,15 @@ can_change_ra(_FAffiliation, _FRole, admin, moderator,
can_change_ra(admin, _FRole, _TAffiliation, moderator,
role, participant, _ServiceAf) ->
true;
can_change_ra(owner, moderator, TAffiliation,
moderator, role, none, _ServiceAf)
when TAffiliation /= owner ->
true;
can_change_ra(admin, moderator, TAffiliation,
moderator, role, none, _ServiceAf)
when (TAffiliation /= owner) and
(TAffiliation /= admin) ->
true;
can_change_ra(_FAffiliation, _FRole, _TAffiliation,
_TRole, role, _Value, _ServiceAf) ->
false.