25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

* src/mod_muc/mod_muc_room.erl: Updated changing roles and

affiliations tables to latest JEP-0045

SVN Revision: 338
This commit is contained in:
Alexey Shchepin 2005-05-02 21:59:39 +00:00
parent bfe18dd116
commit fd118302bc
2 changed files with 36 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2005-05-02 Alexey Shchepin <alexey@sevcom.net>
* src/mod_muc/mod_muc_room.erl: Updated changing roles and
affiliations tables to latest JEP-0045
2005-05-01 Mickael Remond <mremond@erlang-fr.org> 2005-05-01 Mickael Remond <mremond@erlang-fr.org>
* src/msgs/fr.msg: Updated * src/msgs/fr.msg: Updated

View File

@ -1676,6 +1676,19 @@ can_change_ra(FAffiliation, FRole,
affiliation, none) affiliation, none)
when (FAffiliation == owner) or (FAffiliation == admin) -> when (FAffiliation == owner) or (FAffiliation == admin) ->
true; 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, can_change_ra(FAffiliation, FRole,
none, TRole, none, TRole,
affiliation, outcast) affiliation, outcast)
@ -1714,15 +1727,11 @@ can_change_ra(owner, FRole,
true; true;
can_change_ra(owner, FRole, can_change_ra(owner, FRole,
admin, TRole, admin, TRole,
affiliation, member) -> affiliation, _Affiliation) ->
true;
can_change_ra(owner, FRole,
admin, TRole,
affiliation, owner) ->
true; true;
can_change_ra(owner, FRole, can_change_ra(owner, FRole,
owner, TRole, owner, TRole,
affiliation, admin) -> affiliation, _Affiliation) ->
true; true;
can_change_ra(FAffiliation, FRole, can_change_ra(FAffiliation, FRole,
TAffiliation, TRole, TAffiliation, TRole,
@ -1754,6 +1763,22 @@ can_change_ra(FAffiliation, FRole,
role, moderator) role, moderator)
when (FAffiliation == owner) or (FAffiliation == admin) -> when (FAffiliation == owner) or (FAffiliation == admin) ->
true; 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, can_change_ra(FAffiliation, FRole,
owner, moderator, owner, moderator,
role, participant) -> role, participant) ->