summaryrefslogtreecommitdiff
path: root/src/mod_pubsub/node_zoo.erl
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2008-07-22 23:41:44 +0000
committerChristophe Romain <christophe.romain@process-one.net>2008-07-22 23:41:44 +0000
commit7a49880ffc56fc478e7a41fb0f52001e3f4602cf (patch)
tree262c587ddd837463a4541834026aa60c07418ddb /src/mod_pubsub/node_zoo.erl
parent* src/ejabberd_config.erl: If syntax mistake in config file, show (diff)
pubsub improvement, fixes EJAB-684 EJAB-675 EJAB-663
SVN Revision: 1472
Diffstat (limited to '')
-rw-r--r--src/mod_pubsub/node_zoo.erl19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/mod_pubsub/node_zoo.erl b/src/mod_pubsub/node_zoo.erl
index 45e601ed..520a006a 100644
--- a/src/mod_pubsub/node_zoo.erl
+++ b/src/mod_pubsub/node_zoo.erl
@@ -91,18 +91,19 @@ features() ->
%% use same code as node_default, but do not limite node to
%% the home/localhost/user/... hierarchy
%% any node is allowed
-create_node_permission(_Host, ServerHost, _Node, _ParentNode, Owner, Access) ->
+create_node_permission(Host, ServerHost, _Node, _ParentNode, Owner, Access) ->
LOwner = jlib:jid_tolower(Owner),
- %%{_User, _Server, _Resource} = LOwner,
- Allowed = case acl:match_rule(ServerHost, Access, LOwner) of
+ Allowed = case LOwner of
+ {"", Host, ""} ->
+ true; % pubsub service always allowed
+ _ ->
+ case acl:match_rule(ServerHost, Access, LOwner) of
allow ->
true;
- _ ->
- case Owner of
- {jid, "", _, "", "", _, ""} -> true;
- _ -> false
- end
- end,
+ _ ->
+ false
+ end
+ end,
{result, Allowed}.
create_node(Host, Node, Owner) ->