Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 1583:caae7d8934dc
set new email rego user password to random string
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Thu, 10 Apr 2003 05:12:42 +0000 |
| parents | 6eb8aae6d14e |
| children |
comparison
equal
deleted
inserted
replaced
| 1582:54f7717ece32 | 1583:caae7d8934dc |
|---|---|
| 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.33 2003-01-27 16:40:37 kedder Exp $ | 18 # $Id: dbinit.py,v 1.34 2003-04-10 05:12:42 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 |
| 94 priority=Link("priority"), status=Link("status")) | 94 priority=Link("priority"), status=Link("status")) |
| 95 | 95 |
| 96 # | 96 # |
| 97 # SECURITY SETTINGS | 97 # SECURITY SETTINGS |
| 98 # | 98 # |
| 99 # new permissions for this schema | 99 # See the configuration and customisation document for information |
| 100 # about security setup. | |
| 101 # Add new Permissions for this schema | |
| 100 for cl in 'issue', 'file', 'msg', 'user', 'query', 'keyword': | 102 for cl in 'issue', 'file', 'msg', 'user', 'query', 'keyword': |
| 101 db.security.addPermission(name="Edit", klass=cl, | 103 db.security.addPermission(name="Edit", klass=cl, |
| 102 description="User is allowed to edit "+cl) | 104 description="User is allowed to edit "+cl) |
| 103 db.security.addPermission(name="View", klass=cl, | 105 db.security.addPermission(name="View", klass=cl, |
| 104 description="User is allowed to access "+cl) | 106 description="User is allowed to access "+cl) |
| 105 | 107 |
| 106 # Assign the access and edit permissions for issue, file and message | 108 # Assign the access and edit Permissions for issue, file and message |
| 107 # to regular users now | 109 # to regular users now |
| 108 for cl in 'issue', 'file', 'msg', 'query', 'keyword': | 110 for cl in 'issue', 'file', 'msg', 'query', 'keyword': |
| 109 p = db.security.getPermission('View', cl) | 111 p = db.security.getPermission('View', cl) |
| 110 db.security.addPermissionToRole('User', p) | 112 db.security.addPermissionToRole('User', p) |
| 111 p = db.security.getPermission('Edit', cl) | 113 p = db.security.getPermission('Edit', cl) |
| 112 db.security.addPermissionToRole('User', p) | 114 db.security.addPermissionToRole('User', p) |
| 115 | |
| 113 # and give the regular users access to the web and email interface | 116 # and give the regular users access to the web and email interface |
| 114 p = db.security.getPermission('Web Access') | 117 p = db.security.getPermission('Web Access') |
| 115 db.security.addPermissionToRole('User', p) | 118 db.security.addPermissionToRole('User', p) |
| 116 p = db.security.getPermission('Email Access') | 119 p = db.security.getPermission('Email Access') |
| 117 db.security.addPermissionToRole('User', p) | 120 db.security.addPermissionToRole('User', p) |
