diff --git a/ChangeLog b/ChangeLog index 41892ed83..ae599d9d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-05-02 Alexey Shchepin + + * src/mod_muc/mod_muc_room.erl: Updated changing roles and + affiliations tables to latest JEP-0045 + 2005-05-01 Mickael Remond * src/msgs/fr.msg: Updated diff --git a/src/mod_muc/mod_muc_room.erl b/src/mod_muc/mod_muc_room.erl index 355ada522..24e82c944 100644 --- a/src/mod_muc/mod_muc_room.erl +++ b/src/mod_muc/mod_muc_room.erl @@ -1676,6 +1676,19 @@ can_change_ra(FAffiliation, FRole, affiliation, none) when (FAffiliation == owner) or (FAffiliation == admin) -> true; +can_change_ra(FAffiliation, FRole, + outcast, TRole, + affiliation, member) + when (FAffiliation == owner) or (FAffiliation == admin) -> + true; +can_change_ra(owner, FRole, + outcast, TRole, + affiliation, admin) -> + true; +can_change_ra(owner, FRole, + outcast, TRole, + affiliation, owner) -> + true; can_change_ra(FAffiliation, FRole, none, TRole, affiliation, outcast) @@ -1714,15 +1727,11 @@ can_change_ra(owner, FRole, true; can_change_ra(owner, FRole, admin, TRole, - affiliation, member) -> - true; -can_change_ra(owner, FRole, - admin, TRole, - affiliation, owner) -> + affiliation, _Affiliation) -> true; can_change_ra(owner, FRole, owner, TRole, - affiliation, admin) -> + affiliation, _Affiliation) -> true; can_change_ra(FAffiliation, FRole, TAffiliation, TRole, @@ -1754,6 +1763,22 @@ can_change_ra(FAffiliation, FRole, role, moderator) when (FAffiliation == owner) or (FAffiliation == admin) -> true; +can_change_ra(FAffiliation, FRole, + owner, moderator, + role, visitor) -> + false; +can_change_ra(owner, FRole, + TAffiliation, moderator, + role, visitor) -> + true; +can_change_ra(FAffiliation, FRole, + admin, moderator, + role, visitor) -> + false; +can_change_ra(admin, FRole, + TAffiliation, moderator, + role, visitor) -> + true; can_change_ra(FAffiliation, FRole, owner, moderator, role, participant) ->