Mercurial > p > roundup > code
comparison roundup/templates/classic/dbinit.py @ 988:e02093543d59
allow perms on user class
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 30 Aug 2002 08:30:45 +0000 |
| parents | 23c9d4f86380 |
| children | 1798d2fa9fec |
comparison
equal
deleted
inserted
replaced
| 987:5643abab70ed | 988:e02093543d59 |
|---|---|
| 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.22 2002-08-01 00:56:22 richard Exp $ | 18 # $Id: dbinit.py,v 1.23 2002-08-30 08:30:45 richard Exp $ |
| 19 | 19 |
| 20 import os | 20 import os |
| 21 | 21 |
| 22 import instance_config | 22 import instance_config |
| 23 from select_db import Database, Class, FileClass, IssueClass | 23 from select_db import Database, Class, FileClass, IssueClass |
| 90 | 90 |
| 91 # | 91 # |
| 92 # SECURITY SETTINGS | 92 # SECURITY SETTINGS |
| 93 # | 93 # |
| 94 # new permissions for this schema | 94 # new permissions for this schema |
| 95 for cl in 'issue', 'file', 'msg': | 95 for cl in 'issue', 'file', 'msg', 'user': |
| 96 db.security.addPermission(name="Edit", klass=cl, | 96 db.security.addPermission(name="Edit", klass=cl, |
| 97 description="User is allowed to edit "+cl) | 97 description="User is allowed to edit "+cl) |
| 98 db.security.addPermission(name="View", klass=cl, | 98 db.security.addPermission(name="View", klass=cl, |
| 99 description="User is allowed to access "+cl) | 99 description="User is allowed to access "+cl) |
| 100 | 100 |
| 183 | 183 |
| 184 db.commit() | 184 db.commit() |
| 185 | 185 |
| 186 # | 186 # |
| 187 # $Log: not supported by cvs2svn $ | 187 # $Log: not supported by cvs2svn $ |
| 188 # Revision 1.22 2002/08/01 00:56:22 richard | |
| 189 # Added the web access and email access permissions, so people can restrict | |
| 190 # access to users who register through the email interface (for example). | |
| 191 # Also added "security" command to the roundup-admin interface to display the | |
| 192 # Role/Permission config for an instance. | |
| 193 # | |
| 188 # Revision 1.21 2002/07/26 08:26:59 richard | 194 # Revision 1.21 2002/07/26 08:26:59 richard |
| 189 # Very close now. The cgi and mailgw now use the new security API. The two | 195 # Very close now. The cgi and mailgw now use the new security API. The two |
| 190 # templates have been migrated to that setup. Lots of unit tests. Still some | 196 # templates have been migrated to that setup. Lots of unit tests. Still some |
| 191 # issue in the web form for editing Roles assigned to users. | 197 # issue in the web form for editing Roles assigned to users. |
| 192 # | 198 # |
