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:
parent
a8dd91512c
commit
6898553afd
@ -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),
|
||||||
|
Loading…
Reference in New Issue
Block a user