comparison roundup/hyperdb.py @ 8139:de58ff07890e permission-performance

Rename parameter of hasPermission Rename only_no_check to skip_permissions_with_check. Revert explicit no-properties check in Permission.searchable, this check is already taken care of by the _properties_dict check. Add a comment on what _properties_dict does.
author Ralf Schlatterbeck <rsc@runtux.com>
date Thu, 24 Oct 2024 09:19:25 +0200
parents 5a2b9435a04d
children b99e76e76496
comparison
equal deleted inserted replaced
8136:5a2b9435a04d 8139:de58ff07890e
1815 sort = sec.filterSortspec(userid, cn, sort) 1815 sort = sec.filterSortspec(userid, cn, sort)
1816 group = sec.filterSortspec(userid, cn, group) 1816 group = sec.filterSortspec(userid, cn, group)
1817 item_ids = self.filter(search_matches, filterspec, sort, group, 1817 item_ids = self.filter(search_matches, filterspec, sort, group,
1818 retired, exact_match_spec, limit, offset) 1818 retired, exact_match_spec, limit, offset)
1819 check = sec.hasPermission 1819 check = sec.hasPermission
1820 if check(permission, userid, cn, only_no_check = True): 1820 if check(permission, userid, cn, skip_permissions_with_check = True):
1821 allowed = item_ids 1821 allowed = item_ids
1822 else: 1822 else:
1823 debug = self.db.config.RDBMS_DEBUG_FILTER 1823 debug = self.db.config.RDBMS_DEBUG_FILTER
1824 # Note that is_filterable returns True if no permissions are 1824 # Note that is_filterable returns True if no permissions are
1825 # found. This makes it fail early (with an empty allowed list) 1825 # found. This makes it fail early (with an empty allowed list)

Roundup Issue Tracker: http://roundup-tracker.org/