25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-24 17:29:28 +01:00

Fix acl:match_rule/3 call. It takes a #jid record, not a short JID.

PR:		EJABP-1

SVN Revision: 1708
This commit is contained in:
Jean-Sébastien Pédron 2008-12-08 11:20:21 +00:00
parent 163d185776
commit d01c24bd23
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-12-05 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/mod_pubsub/node_default.erl, src/mod_pubsub/node_pep.erl: Fix
acl:match_rule/3 call. It takes a #jid record, not a short JID.
2008-12-05 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/ejabberd_receiver.erl, src/mod_offline_odbc.erl,

View File

@ -201,7 +201,8 @@ create_node_permission(Host, ServerHost, Node, _ParentNode, Owner, Access) ->
{undefined, Host, undefined} ->
true; % pubsub service always allowed
_ ->
case acl:match_rule(ServerHost, Access, LOwner) of
{LU, LS, LR} = LOwner,
case acl:match_rule(ServerHost, Access, exmpp_jid:make_jid(LU, LS, LR)) of
allow ->
case Node of
["home", Server, User | _] -> true;

View File

@ -118,7 +118,8 @@ create_node_permission(Host, ServerHost, _Node, _ParentNode, Owner, Access) ->
{undefined, Host, undefined} ->
true; % pubsub service always allowed
_ ->
case acl:match_rule(ServerHost, Access, LOwner) of
{LU, LS, LR} = LOwner,
case acl:match_rule(ServerHost, Access, exmpp_jid:make_jid(LU, LS, LR)) of
allow ->
case Host of
{User, Server, _} -> true;