Mercurial > libervia-pubsub
diff sat_pubsub/iidavoll.py @ 265:89493845d3dd
fix the method signatures of iidavoll.ILeafNode and memory_storage.LeafNode according to pgsql_storage.LeafNode
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 22 Feb 2014 08:04:09 +0100 |
parents | 9dfd3890e646 |
children | 8a71486c3e95 |
line wrap: on
line diff
--- a/sat_pubsub/iidavoll.py Sat Feb 22 06:10:24 2014 +0100 +++ b/sat_pubsub/iidavoll.py Sat Feb 22 08:04:09 2014 +0100 @@ -537,22 +537,23 @@ """ - def getItems(maxItems=None): - """ - Get items. - - If C{maxItems} is not given, all items in the node are returned, + def getItems(authorized_groups, unrestricted, maxItems=None): + """ Get all authorised items + If C{maxItems} is not given, all authorised items in the node are returned, just like C{getItemsById}. Otherwise, C{maxItems} limits the returned items to a maximum of that number of most recently - published items. + published and authorised items. + @param authorized_groups: we want to get items that these groups can access + @param unrestricted: if true, don't check permissions (i.e.: get all items) @param maxItems: if given, a natural number (>0) that limits the returned number of items. - @return: deferred that fires with a C{list} of found items. + @return: deferred that fires a C{list} of (item, access_model, id) + if unrestricted is True, else a C{list} of items. """ - def getItemsById(itemIdentifiers): + def getItemsById(authorized_groups, unrestricted, itemIdentifiers): """ Get items by item id. @@ -560,8 +561,11 @@ represent the XML of the item as it was published, including the item wrapper with item id. + @param authorized_groups: we want to get items that these groups can access + @param unrestricted: if true, don't check permissions @param itemIdentifiers: C{list} of item ids. - @return: deferred that fires with a C{list} of found items. + @return: deferred that fires a C{list} of (item, access_model, id) + if unrestricted is True, else a C{list} of items. """