comparison roundup/templates/classic/dbinit.py @ 1136:7e193bbda38e

added generic item editing . much nicer layout of template rendering errors . added context/is_edit_ok and context/is_view_ok convenience methods and implemented use of them in the classic template
author Richard Jones <richard@users.sourceforge.net>
date Fri, 13 Sep 2002 03:31:19 +0000
parents a95428868bf4
children 7441653e5330
comparison
equal deleted inserted replaced
1135:645a7caa2e9c 1136:7e193bbda38e
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.28 2002-09-11 02:49:56 richard Exp $ 18 # $Id: dbinit.py,v 1.29 2002-09-13 03:31:18 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', 'keyword': 96 for cl in 'issue', 'file', 'msg', 'user', 'query', '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', 'keyword': 104 for cl in 'issue', 'file', 'msg', 'query', '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

Roundup Issue Tracker: http://roundup-tracker.org/