25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

In match_acl/3, use string() version of User/Server/Resource to match an

ACL.

PR:		EJABP-1

SVN Revision: 1837
This commit is contained in:
Jean-Sébastien Pédron 2009-01-21 12:44:36 +00:00
parent 03f2de75f5
commit 8a413018c2
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-01-21 Jean-Sébastien Pédron <js.pedron@meetic-corp.com>
* src/acl.erl (match_acl/3): Use string() version of
User/Server/Resource to match an ACL.
2009-01-19 Pablo Polvorin <pablo.polvorin@process-one.net> 2009-01-19 Pablo Polvorin <pablo.polvorin@process-one.net>
* src/cyrsasl_digest.erl: Typo (prolists -> proplists). * src/cyrsasl_digest.erl: Typo (prolists -> proplists).

View File

@ -158,7 +158,9 @@ match_acl(ACL, JID, Host) ->
all -> true; all -> true;
none -> false; none -> false;
_ -> _ ->
{User, Server, Resource} = jlib:short_prepd_jid(JID), User = exmpp_jid:lnode_as_list(JID),
Server = exmpp_jid:ldomain_as_list(JID),
Resource = exmpp_jid:lresource_as_list(JID),
lists:any(fun(#acl{aclspec = Spec}) -> lists:any(fun(#acl{aclspec = Spec}) ->
case Spec of case Spec of
all -> all ->