@@ -2460,13 +2460,6 @@ is also done in the ``open()`` function of ``dbinit.py``.
24602460There are currently two loops which set up permissions and then assign
24612461them to various roles. Simply add the new "category" to both lists::
24622462
2463- # new permissions for this schema
2464- for cl in 'issue', 'file', 'msg', 'user', 'category':
2465- db.security.addPermission(name="Edit", klass=cl,
2466- description="User is allowed to edit "+cl)
2467- db.security.addPermission(name="View", klass=cl,
2468- description="User is allowed to access "+cl)
2469-
24702463 # Assign the access and edit permissions for issue, file and message
24712464 # to regular users now
24722465 for cl in 'issue', 'file', 'msg', 'category':
@@ -2475,24 +2468,8 @@ them to various roles. Simply add the new "category" to both lists::
24752468 p = db.security.getPermission('Edit', cl)
24762469 db.security.addPermissionToRole('User', p)
24772470
2478- So you are in effect doing the following (with 'cl' substituted by its
2479- value)::
2480-
2481- db.security.addPermission(name="Edit", klass='category',
2482- description="User is allowed to edit "+'category')
2483- db.security.addPermission(name="View", klass='category',
2484- description="User is allowed to access "+'category')
2485-
2486- which is creating two permission types; that of editing and viewing
2487- "category" objects respectively. Then the following lines assign those
2488- new permissions to the "User" role, so that normal users can view and
2489- edit "category" objects::
2490-
2491- p = db.security.getPermission('View', 'category')
2492- db.security.addPermissionToRole('User', p)
2493-
2494- p = db.security.getPermission('Edit', 'category')
2495- db.security.addPermissionToRole('User', p)
2471+ These lines assign the View and Edit Permissions to the "User" role, so
2472+ that normal users can view and edit "category" objects.
24962473
24972474This is all the work that needs to be done for the database. It will
24982475store categories, and let users view and edit them. Now on to the
0 commit comments