mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Allow an occupant owner/admin to kick lower-affiliation moderator
This commit is contained in:
parent
8b61c7fe4b
commit
49f1b4a691
@ -3051,6 +3051,15 @@ can_change_ra(_FAffiliation, _FRole, admin, moderator,
|
|||||||
can_change_ra(admin, _FRole, _TAffiliation, moderator,
|
can_change_ra(admin, _FRole, _TAffiliation, moderator,
|
||||||
role, participant, _ServiceAf) ->
|
role, participant, _ServiceAf) ->
|
||||||
true;
|
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,
|
can_change_ra(_FAffiliation, _FRole, _TAffiliation,
|
||||||
_TRole, role, _Value, _ServiceAf) ->
|
_TRole, role, _Value, _ServiceAf) ->
|
||||||
false.
|
false.
|
||||||
|
Loading…
Reference in New Issue
Block a user