25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +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>
* src/msgs/fr.msg: Updated

View File

@ -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) ->