summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1184281)
raw | patch | inline | side by side (parent: 1184281)
author | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 15 Jul 2011 14:13:51 +0000 (14:13 +0000) | ||
committer | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 15 Jul 2011 14:13:51 +0000 (14:13 +0000) |
(e.g. on the new "Search" permission") by adding a "permission"
parameter. Thanks to Eli Collins for the patch. Closes issue2550699.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4636 57a73879-2fb5-44c3-a270-3262357dd7e2
parameter. Thanks to Eli Collins for the patch. Closes issue2550699.
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4636 57a73879-2fb5-44c3-a270-3262357dd7e2
CHANGES.txt | patch | blob | history | |
roundup/cgi/templating.py | patch | blob | history |
diff --git a/CHANGES.txt b/CHANGES.txt
index d2ff6953a67f6fc4455d2bb256d11da9836f7045..76f9b5efe1ece75efc3bfa57518243417823243b 100644 (file)
--- a/CHANGES.txt
+++ b/CHANGES.txt
- PostgreSQL backend minor improvement: database creation less likely to fail
for PostgreSQL versions >= 8.1 as the table "postgres" is used by default.
Closes issue2550543. Thanks to Kai Storbeck for the patch. (Bernhard Reiter)
+- Allow HTMLRequest.batch to filter on other permissions than "View"
+ (e.g. on the new "Search" permission") by adding a "permission"
+ parameter. Thanks to Eli Collins for the patch. Closes issue2550699.
Fixed:
index 04cfd76ab6cb3689d59d7ebc108c8d0904f1c3d9..b0eaf022bc34120b2084c9bc433d5d39b7dd5e1a 100644 (file)
</script>
"""%self.base
- def batch(self):
+ def batch(self, permission='View'):
""" Return a batch object for results from the "current search"
"""
check = self._client.db.security.hasPermission
# filter for visibility
l = [id for id in klass.filter(matches, filterspec, sort, group)
- if check('View', userid, self.classname, itemid=id)]
+ if check(permission, userid, self.classname, itemid=id)]
# return the batch object, using IDs only
return Batch(self.client, l, self.pagesize, self.startwith,