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

Owner can delete any items from its own node (EJAB-1445)

This commit is contained in:
Christophe Romain 2011-05-06 14:02:37 +02:00
parent a8dd91512c
commit 6898553afd

View File

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