Mercurial > p > roundup > code
comparison roundup/backends/rdbms_common.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 | b1704ba7be41 |
| children | 3e0961d6d44d |
comparison
equal
deleted
inserted
replaced
| 2075:b1704ba7be41 | 2076:2a4309450202 |
|---|---|
| 1 # $Id: rdbms_common.py,v 1.77 2004-03-12 04:08:59 richard Exp $ | 1 # $Id: rdbms_common.py,v 1.78 2004-03-12 05:36:26 richard Exp $ |
| 2 ''' Relational database (SQL) backend common code. | 2 ''' Relational database (SQL) backend common code. |
| 3 | 3 |
| 4 Basics: | 4 Basics: |
| 5 | 5 |
| 6 - map roundup classes to relational tables | 6 - map roundup classes to relational tables |
| 506 print >>hyperdb.DEBUG, 'addclass', (self, cl) | 506 print >>hyperdb.DEBUG, 'addclass', (self, cl) |
| 507 cn = cl.classname | 507 cn = cl.classname |
| 508 if self.classes.has_key(cn): | 508 if self.classes.has_key(cn): |
| 509 raise ValueError, cn | 509 raise ValueError, cn |
| 510 self.classes[cn] = cl | 510 self.classes[cn] = cl |
| 511 | |
| 512 # add default Edit and View permissions | |
| 513 self.security.addPermission(name="Edit", klass=cn, | |
| 514 description="User is allowed to edit "+cn) | |
| 515 self.security.addPermission(name="View", klass=cn, | |
| 516 description="User is allowed to access "+cn) | |
| 511 | 517 |
| 512 def getclasses(self): | 518 def getclasses(self): |
| 513 ''' Return a list of the names of all existing classes. | 519 ''' Return a list of the names of all existing classes. |
| 514 ''' | 520 ''' |
| 515 if __debug__: | 521 if __debug__: |
