@@ -477,18 +477,46 @@ If you have not modified the query.edit.html template in your tracker,
477477you should be able to copy the new version from the location above.
478478Otherwise you will have to merge the changes into your modified template.
479479
480- You will need to add the query Restore permission for the User role to
481- your tracker's schema.py file. Place it right after the query retire
482- permission for the user role. After the change it should look like::
480+ Add the query Restore permission for the User role to your tracker's
481+ schema.py file. Place it right after the query retire permission for
482+ the user role. After the change it should look like::
483483
484484 p = db.security.addPermission(name='Retire', klass='query', check=edit_query,
485485 description="User is allowed to retire their queries")
486486 db.security.addPermissionToRole('User', p)
487- p = db.security.addPermission(name='Restore', klass='query', check=edit_query,
487+ p = db.security.addPermission(name='Restore', klass='query',
488+ check=edit_query,
488489 description="User is allowed to restore their queries")
489490 db.security.addPermissionToRole('User', p)
490491
491- where the last three lines are the ones you need to add.
492+ where the last four lines are the ones you need to add.
493+
494+ Usually you can add this to your User role. If all users have the User
495+ role in common then all logged in users should be ok. If you have
496+ users who do not include the User role (e.g. they may only have a
497+ Provisional role), you should add the search permission to that role
498+ (e.g. Provisional) as well if you allow them to edit their list of
499+ queries.
500+
501+ Also see the `new search permissions for query in 1.4.17`_ section
502+ discussing search permission requirements for editing queries. The
503+ fixes in this release require the ability to search the creator of all
504+ queries to work correctly.
505+
506+ If the test script for the `new search permissions for query in
507+ 1.4.17`_ doesn't report that a role has the ability to search queries
508+ or at least search the creator property for queries, add the following
509+ permissions to your schema.py::
510+
511+ s = db.security.addPermission(name='Search', klass='query',
512+ properties=['creator'],
513+ description="User is allowed to Search queries for creator")
514+ db.security.addPermissionToRole('User', s)
515+
516+ If you do not do this, public queries will be listed twice in the edit
517+ interface. Once in the "Queries I created" section and again in the
518+ "Queries others created" section of the query edit page
519+ (``http..../query?@template=edit``).
492520
493521Enhancement to check command for Permissions
494522--------------------------------------------
@@ -739,6 +767,8 @@ version. If you are starting the server without a configuration file
739767and want to explicitly listen to all network interface, you should
740768specify the -n option with the address `0.0.0.0`.
741769
770+ .. _new search permissions for query in 1.4.17:
771+
742772Searching now requires either read-permission without a check method, or
743773you will have to add a "Search" permission for a class or a list of
744774properties for a class (if you want to allow searching). For the classic
@@ -766,7 +796,7 @@ search for this property::
766796
767797 for cl in sorted(db.getclasses()):
768798 print "Class:", cl
769- for p in sorted(db.getclass(cl).properties .keys()):
799+ for p in sorted(db.getclass(cl).getprops(protected=True) .keys()):
770800 print " Property:", p
771801 roles = []
772802 for role in sorted(db.security.role.iterkeys()):
0 commit comments