summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2009-10-12 15:22:14 +0000
committerChristophe Romain <christophe.romain@process-one.net>2009-10-12 15:22:14 +0000
commit3128c267662597c332fb3552484d29098b160fc5 (patch)
tree7b77945bf242b91f01778b1aaa1bd9a972b16c93 /src
parentautodetect compilation parameters for Mac OS X Snow Leopard (EJAB-1056) (diff)
fix get_item issue on authorize access model (thanks to brian cully) (EJAB-1060)
SVN Revision: 2660
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub/node_hometree.erl4
-rw-r--r--src/mod_pubsub/node_hometree_odbc.erl4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mod_pubsub/node_hometree.erl b/src/mod_pubsub/node_hometree.erl
index d557a1a1..efb14c92 100644
--- a/src/mod_pubsub/node_hometree.erl
+++ b/src/mod_pubsub/node_hometree.erl
@@ -907,7 +907,7 @@ get_items(NodeId, JID, AccessModel, PresenceSubscription, RosterGroup, _SubId) -
(AccessModel == whitelist) and (not Whitelisted) ->
%% Node has whitelist access model and entity lacks required affiliation
{error, ?ERR_EXTENDED(?ERR_NOT_ALLOWED, "closed-node")};
- (AccessModel == authorize) -> % TODO: to be done
+ (AccessModel == authorize) and (not Whitelisted) ->
%% Node has authorize access model
{error, ?ERR_FORBIDDEN};
%%MustPay ->
@@ -955,7 +955,7 @@ get_item(NodeId, ItemId, JID, AccessModel, PresenceSubscription, RosterGroup, _S
(AccessModel == whitelist) and (not Whitelisted) ->
%% Node has whitelist access model and entity lacks required affiliation
{error, ?ERR_EXTENDED(?ERR_NOT_ALLOWED, "closed-node")};
- (AccessModel == authorize) -> % TODO: to be done
+ (AccessModel == authorize) and (not Whitelisted) ->
%% Node has authorize access model
{error, ?ERR_FORBIDDEN};
%%MustPay ->
diff --git a/src/mod_pubsub/node_hometree_odbc.erl b/src/mod_pubsub/node_hometree_odbc.erl
index b4ac3fec..4056d1e8 100644
--- a/src/mod_pubsub/node_hometree_odbc.erl
+++ b/src/mod_pubsub/node_hometree_odbc.erl
@@ -1082,7 +1082,7 @@ get_items(NodeId, JID, AccessModel, PresenceSubscription, RosterGroup, _SubId, R
(AccessModel == whitelist) and (not Whitelisted) ->
%% Node has whitelist access model and entity lacks required affiliation
{error, ?ERR_EXTENDED(?ERR_NOT_ALLOWED, "closed-node")};
- (AccessModel == authorize) -> % TODO: to be done
+ (AccessModel == authorize) and (not Whitelisted)
%% Node has authorize access model
{error, ?ERR_FORBIDDEN};
%%MustPay ->
@@ -1145,7 +1145,7 @@ get_item(NodeId, ItemId, JID, AccessModel, PresenceSubscription, RosterGroup, _S
(AccessModel == whitelist) and (not Whitelisted) ->
%% Node has whitelist access model and entity lacks required affiliation
{error, ?ERR_EXTENDED(?ERR_NOT_ALLOWED, "closed-node")};
- (AccessModel == authorize) -> % TODO: to be done
+ (AccessModel == authorize) and (not Whitelisted)
%% Node has authorize access model
{error, ?ERR_FORBIDDEN};
%%MustPay ->