Mercurial > p > roundup > code
comparison templates/classic/dbinit.py @ 2078:8e13768d02af
permission fix for anonymous
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 15 Mar 2004 05:51:23 +0000 |
| parents | 3e0961d6d44d |
| children | ee3cf6a44f29 |
comparison
equal
deleted
inserted
replaced
| 2077:3e0961d6d44d | 2078:8e13768d02af |
|---|---|
| 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.5 2004-03-15 05:50:20 richard Exp $ | 18 # $Id: dbinit.py,v 1.6 2004-03-15 05:51:23 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 |
| 128 # - Allow anonymous (new) users to register through the email gateway | 128 # - Allow anonymous (new) users to register through the email gateway |
| 129 p = db.security.getPermission('Email Registration') | 129 p = db.security.getPermission('Email Registration') |
| 130 db.security.addPermissionToRole('Anonymous', p) | 130 db.security.addPermissionToRole('Anonymous', p) |
| 131 # - Allow anonymous users access to view issues (which implies being | 131 # - Allow anonymous users access to view issues (which implies being |
| 132 # able to view all linked information too | 132 # able to view all linked information too |
| 133 for cl in 'issue', 'file', 'msg', 'keyword': | 133 for cl in 'issue', 'file', 'msg', 'keyword', 'priority', 'status': |
| 134 p = db.security.getPermission('View', cl) | 134 p = db.security.getPermission('View', cl) |
| 135 db.security.addPermissionToRole('Anonymous', p) | 135 db.security.addPermissionToRole('Anonymous', p) |
| 136 # - Allow anonymous users access to edit the "issue" class of data | 136 # - Allow anonymous users access to edit the "issue" class of data |
| 137 # Note: this also grants access to create related information like | 137 # Note: this also grants access to create related information like |
| 138 # files and messages etc that are linked to issues | 138 # files and messages etc that are linked to issues |
