]> granicus.if.org Git - ejabberd/commitdiff
Owner can delete any items from its own node (EJAB-1445)
authorChristophe Romain <christophe.romain@process-one.net>
Fri, 6 May 2011 12:02:37 +0000 (14:02 +0200)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 6 May 2011 12:02:37 +0000 (14:02 +0200)
src/mod_pubsub/node_flat.erl

index 1eb74d84249c672e8cc7146a4c8fe4eb19b410e2..a9a2f7eeb9389b1b522db0ae61361595fab7b779 100644 (file)
@@ -651,10 +651,10 @@ delete_item(NodeIdx, #jid{node = U, domain = S} = _JID, PublishModel, ItemId) ->
                false ->
                    case Affiliation of
                        'owner' ->
-                           %% Owner can delete other publishers items as well
+                           %% Owner can delete any items from its own node
                            {'result', States} = get_states(NodeIdx),
                            lists:foldl(fun
-                                       (#pubsub_state{items = ItemIds, affiliation = publisher} = State, Result) ->
+                                       (#pubsub_state{items = ItemIds} = State, Result) ->
                                               case lists:member(ItemId, ItemIds) of
                                                   true ->
                                                       del_item(NodeIdx, ItemId),