Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 1113:a95428868bf4
Added the missing keyword/topic interface to classic template (blush)
Cleaned up the classhelp API
Fixed some stuff in the customisation doc example.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 11 Sep 2002 02:49:56 +0000 |
| parents | 62485452f514 |
| children | 7e193bbda38e |
comparison
equal
deleted
inserted
replaced
| 1112:70f187da3cf2 | 1113:a95428868bf4 |
|---|---|
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 17 # | 17 # |
| 18 # $Id: dbinit.py,v 1.27 2002-09-11 01:18:24 richard Exp $ | 18 # $Id: dbinit.py,v 1.28 2002-09-11 02:49:56 richard Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import config | 22 import config |
| 23 from select_db import Database, Class, FileClass, IssueClass | 23 from select_db import Database, Class, FileClass, IssueClass |
| 91 | 91 |
| 92 # | 92 # |
| 93 # SECURITY SETTINGS | 93 # SECURITY SETTINGS |
| 94 # | 94 # |
| 95 # new permissions for this schema | 95 # new permissions for this schema |
| 96 for cl in 'issue', 'file', 'msg', 'user': | 96 for cl in 'issue', 'file', 'msg', 'user', 'keyword': |
| 97 db.security.addPermission(name="Edit", klass=cl, | 97 db.security.addPermission(name="Edit", klass=cl, |
| 98 description="User is allowed to edit "+cl) | 98 description="User is allowed to edit "+cl) |
| 99 db.security.addPermission(name="View", klass=cl, | 99 db.security.addPermission(name="View", klass=cl, |
| 100 description="User is allowed to access "+cl) | 100 description="User is allowed to access "+cl) |
| 101 | 101 |
| 102 # Assign the access and edit permissions for issue, file and message | 102 # Assign the access and edit permissions for issue, file and message |
| 103 # to regular users now | 103 # to regular users now |
| 104 for cl in 'issue', 'file', 'msg': | 104 for cl in 'issue', 'file', 'msg', 'keyword': |
| 105 p = db.security.getPermission('View', cl) | 105 p = db.security.getPermission('View', cl) |
| 106 db.security.addPermissionToRole('User', p) | 106 db.security.addPermissionToRole('User', p) |
| 107 p = db.security.getPermission('Edit', cl) | 107 p = db.security.getPermission('Edit', cl) |
| 108 db.security.addPermissionToRole('User', p) | 108 db.security.addPermissionToRole('User', p) |
| 109 # and give the regular users access to the web and email interface | 109 # and give the regular users access to the web and email interface |
