Skip to content

Commit 619c400

Browse files
author
cauly
committed
fix bug #13940
1 parent 43533d2 commit 619c400

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

configurable_permission/configurable_permission.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,10 @@ def check_permission(self, action, username, resource, user_perm):
4242
except QuerySyntaxError as e:
4343
raise TracError(e)
4444
try:
45-
tickets = query.execute()
45+
ticketsCount = query.count(authname=username)
4646
except QueryValueError as e:
4747
raise TracError(e)
48-
if len(tickets) > 0:
49-
flag = True
48+
flag = ticketsCount > 0
5049

5150
if flag:
5251
return self._should_allow(perm, user_perm)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from setuptools import find_packages, setup
1616

1717
setup(
18-
name='TracConfigurablePermissionPlugin', version='1.0',
18+
name='TracConfigurablePermissionPlugin', version='1.1',
1919
packages=find_packages(exclude=['*.tests*']),
2020
license = "BSD 3-Clause",
2121
author_email='[email protected]',

0 commit comments

Comments
 (0)