Code

Add new config-option 'migrate_passwords' in section 'web' to
[roundup.git] / doc / upgrading.txt
index 8591021aa4efc90d4504f654d247a397204d18b0..a1bd77f9f18ad0cc0b9017c2ac9a51b780178edd 100644 (file)
@@ -13,6 +13,52 @@ steps.
 
 .. contents::
 
+Migrating from 1.4.x to 1.4.17
+==============================
+
+There is a new config-option 'migrate_passwords' in section 'web' to
+auto-migrate passwords at web-login time to a more secure storage
+scheme. Default for the new option is "yes" so if you don't want that
+passwords are auto-migrated to a more secure password scheme on user
+login, set this to "no" before running your tracker(s) after the
+upgrade.
+
+Searching now requires either read-permission without a check method, or
+you will have to add a "Search" permission for a class or a list of
+properties for a class (if you want to allow searching). For the classic
+template (or other templates derived from it) you want to add the
+following lines to your `schema.py` file::
+
+  p = db.security.addPermission(name='Search', klass='query')
+  db.security.addPermissionToRole('User', p)
+
+This is needed, because for the `query` class users may view only their
+own queries (or public queries). This is implemented with a `check`
+method, therefore the default search permissions will not allow
+searching and you'll have to add an explicit search permission.
+If you have modified your schema, you can check if you're missing any
+search permissions with the following script, run it in your tracker
+directory, it will list for each Class and Property the roles that may
+search for this property::
+
+    #!/usr/bin/python
+    import os
+    from roundup import instance
+    
+    tracker = instance.open(os.getcwd ())
+    db = tracker.open('admin')
+    
+    for cl in sorted(db.getclasses()):
+        print "Class:", cl
+        for p in sorted(db.getclass(cl).properties.keys()):
+            print "    Property:", p
+            roles = []
+            for role in sorted(db.security.role.iterkeys()):
+                if db.security.roleHasSearchPermission(cl,p,role):
+                    roles.append(role)
+            print "        roles may search:", ', '.join(roles)
+
+
 Migrating from 1.4.x to 1.4.12
 ==============================
 
@@ -107,7 +153,7 @@ assign it to the Anonymous role (replacing any previously assigned
 The lines marked "+" should be added and lines marked "-" should be
 deleted (minus the "+"/"-" signs).
 
-You should also modify the ``html/page.py`` template to change the
+You should also modify the ``html/page.html`` template to change the
 permission tested there::
 
    -tal:condition="python:request.user.hasPermission('Create', 'user')"
@@ -215,7 +261,7 @@ The lines marked "+" should be added, minus the "+" sign.
 Fix the "retire" link in the users list for admin users
 -------------------------------------------------------
 
-The "retire" link found in the file ``html/users.index.html``::
+The "retire" link found in the file ``html/user.index.html``::
 
   <td tal:condition="context/is_edit_ok">
    <a tal:attributes="href string:user${user/id}?@action=retire&@template=index"
@@ -319,8 +365,8 @@ SQL-backends (mysql, postgresql, sqlite) for speeding up building the
 roundup-index for full-text search. We recommend that you create the
 following database indexes on the database by hand::
 
- CREATE INDEX words_by_id ON __words (_textid)
- CREATE UNIQUE INDEX __textids_by_props ON __textids (_class, _itemid, _prop)
+ CREATE INDEX words_by_id ON __words (_textid);
+ CREATE UNIQUE INDEX __textids_by_props ON __textids (_class, _itemid, _prop);
 
 Migrating from 1.2.x to 1.3.0
 =============================