25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Allow a subscribed owner/admin to kick lower-affiliation moderator

This commit is contained in:
Badlop 2018-09-25 10:43:38 +02:00
parent 49f1b4a691
commit e054c2800b

View File

@ -3055,11 +3055,20 @@ can_change_ra(owner, moderator, TAffiliation,
moderator, role, none, _ServiceAf)
when TAffiliation /= owner ->
true;
can_change_ra(owner, subscriber, 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(admin, subscriber, TAffiliation,
moderator, role, none, _ServiceAf)
when (TAffiliation /= owner) and
(TAffiliation /= admin) ->
true;
can_change_ra(_FAffiliation, _FRole, _TAffiliation,
_TRole, role, _Value, _ServiceAf) ->
false.