Skip to content

Commit be257c4

Browse files
committed
issue2550855: added search perms for anonymous to the user class.
This lets the "show unassigned" search work for anonymous. Patch by Stuart McGraw. Added warning to upgrading.txt and a comment block before the schema change in every template tracker except minimal (doesn't have the search).
1 parent 01db6fb commit be257c4

File tree

6 files changed

+52
-0
lines changed

6 files changed

+52
-0
lines changed

CHANGES.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,13 @@ Fixed:
195195
porter stemmer will work. This means capitalization is not
196196
preserved. Fix done by David Wolever (wolever). Committed and doc
197197
updates John Rouillard.
198+
- issue2550855: "show unassigned" link shows all open issues if not
199+
logged in. This adds permission for the anonymous user to search
200+
the users class. Without this the unassigned search can't see if
201+
there is a user assigned to an issue, so it acts like all open
202+
issues. Patch supplied by Stuart McGraw (smcgraw). For caveats
203+
see ``upgrading.txt`` and the comments in the default templates.
204+
(Docs created and applcation by John Rouillard)
198205

199206
2016-01-11: 1.5.1
200207

doc/upgrading.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,19 @@ If your deployed tracker is based on: classic, minimal, responsive or
118118
devel templates and has not changed the html/_generic.404.html file,
119119
you can copy in the new file to get this additional functionality.
120120

121+
Schema change to allow "Show Unassigned" issues link to work for Anonymous user
122+
-------------------------------------------------------------------------------
123+
124+
In this release the anonymous user is allowed to search the user
125+
class. The following was added to the schema for all templates that
126+
provide the search option::
127+
128+
p = db.security.addPermission(name='Search', klass='user')
129+
db.security.addPermissionToRole ('Anonymous', p)
130+
131+
If you are running a tracker that **does not** allow read access for
132+
anonymous, you should remove this entry as it can be used to perform
133+
a username guessing attack against a roundup install.
121134

122135
Migrating from 1.5.0 to 1.5.1
123136
=============================

share/roundup/templates/classic/schema.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ def edit_query(db, userid, itemid):
170170
for cl in 'issue', 'file', 'msg', 'keyword', 'priority', 'status':
171171
db.security.addPermissionToRole('Anonymous', 'View', cl)
172172

173+
# Allow the anonymous user to use the "Show Unassigned" search.
174+
# It acts like "Show Open" if this permission is not available.
175+
# If you are running a tracker that does not allow read access for
176+
# anonymous, you should remove this entry as it can be used to perform
177+
# a username guessing attack against a roundup install.
178+
p = db.security.addPermission(name='Search', klass='user')
179+
db.security.addPermissionToRole ('Anonymous', p)
180+
173181
# [OPTIONAL]
174182
# Allow anonymous users access to create or edit "issue" items (and the
175183
# related file and message items)

share/roundup/templates/devel/schema.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,14 @@ def edit_query(db, userid, itemid):
377377
for cl in 'bug', 'severity', 'status', 'resolution', 'msg', 'file':
378378
db.security.addPermissionToRole('Anonymous', 'View', cl)
379379

380+
# Allow the anonymous user to use the "Show Unassigned" search.
381+
# It acts like "Show Open" if this permission is not available.
382+
# If you are running a tracker that does not allow read access for
383+
# anonymous, you should remove this entry as it can be used to perform
384+
# a username guessing attack against a roundup install.
385+
p = db.security.addPermission(name='Search', klass='user')
386+
db.security.addPermissionToRole ('Anonymous', p)
387+
380388
# [OPTIONAL]
381389
# Allow anonymous users access to create or edit "issue" items (and the
382390
# related file and message items)

share/roundup/templates/jinja2/schema.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,14 @@ def edit_query(db, userid, itemid):
170170
for cl in 'issue', 'file', 'msg', 'keyword', 'priority', 'status':
171171
db.security.addPermissionToRole('Anonymous', 'View', cl)
172172

173+
# Allow the anonymous user to use the "Show Unassigned" search.
174+
# It acts like "Show Open" if this permission is not available.
175+
# If you are running a tracker that does not allow read access for
176+
# anonymous, you should remove this entry as it can be used to perform
177+
# a username guessing attack against a roundup install.
178+
p = db.security.addPermission(name='Search', klass='user')
179+
db.security.addPermissionToRole ('Anonymous', p)
180+
173181
# [OPTIONAL]
174182
# Allow anonymous users access to create or edit "issue" items (and the
175183
# related file and message items)

share/roundup/templates/responsive/schema.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,14 @@ def edit_query(db, userid, itemid):
376376
for cl in 'bug', 'severity', 'status', 'resolution', 'msg', 'file':
377377
db.security.addPermissionToRole('Anonymous', 'View', cl)
378378

379+
# Allow the anonymous user to use the "Show Unassigned" search.
380+
# It acts like "Show Open" if this permission is not available.
381+
# If you are running a tracker that does not allow read access for
382+
# anonymous, you should remove this entry as it can be used to perform
383+
# a username guessing attack against a roundup install.
384+
p = db.security.addPermission(name='Search', klass='user')
385+
db.security.addPermissionToRole ('Anonymous', p)
386+
379387
# [OPTIONAL]
380388
# Allow anonymous users access to create or edit "issue" items (and the
381389
# related file and message items)

0 commit comments

Comments
 (0)