Mercurial > p > roundup > code
comparison templates/minimal/dbinit.py @ 2076:2a4309450202
security fixes and doc updates
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 12 Mar 2004 05:36:26 +0000 |
| parents | 21312a7564fd |
| children |
comparison
equal
deleted
inserted
replaced
| 2075:b1704ba7be41 | 2076:2a4309450202 |
|---|---|
| 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.1 2003-04-17 03:27:27 richard Exp $ | 18 # $Id: dbinit.py,v 1.2 2004-03-12 05:36:26 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 |
| 47 # add any additional database schema configuration here | 47 # add any additional database schema configuration here |
| 48 | 48 |
| 49 # | 49 # |
| 50 # SECURITY SETTINGS | 50 # SECURITY SETTINGS |
| 51 # | 51 # |
| 52 # new permissions for this schema | |
| 53 for cl in ('user', ): | |
| 54 db.security.addPermission(name="Edit", klass=cl, | |
| 55 description="User is allowed to edit "+cl) | |
| 56 db.security.addPermission(name="View", klass=cl, | |
| 57 description="User is allowed to access "+cl) | |
| 58 | |
| 59 # and give the regular users access to the web and email interface | 52 # and give the regular users access to the web and email interface |
| 60 p = db.security.getPermission('Web Access') | 53 p = db.security.getPermission('Web Access') |
| 61 db.security.addPermissionToRole('User', p) | 54 db.security.addPermissionToRole('User', p) |
| 62 p = db.security.getPermission('Email Access') | 55 p = db.security.getPermission('Email Access') |
| 63 db.security.addPermissionToRole('User', p) | 56 db.security.addPermissionToRole('User', p) |
