Mercurial > p > roundup > code
comparison roundup/cgi/actions.py @ 3473:370bb8f3c4d1
fix permission check on RetireAction [SF#1407342]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 20 Jan 2006 02:12:53 +0000 |
| parents | d3b02352484f |
| children | a4167cc55cb4 |
comparison
equal
deleted
inserted
replaced
| 3472:522b11d5ba8d | 3473:370bb8f3c4d1 |
|---|---|
| 1 #$Id: actions.py,v 1.52 2006-01-13 03:56:36 richard Exp $ | 1 #$Id: actions.py,v 1.53 2006-01-20 02:12:53 richard Exp $ |
| 2 | 2 |
| 3 import re, cgi, StringIO, urllib, Cookie, time, random, csv | 3 import re, cgi, StringIO, urllib, Cookie, time, random, csv |
| 4 | 4 |
| 5 from roundup import hyperdb, token, date, password | 5 from roundup import hyperdb, token, date, password |
| 6 from roundup.i18n import _ | 6 from roundup.i18n import _ |
| 121 self.db.commit() | 121 self.db.commit() |
| 122 | 122 |
| 123 self.client.ok_message.append( | 123 self.client.ok_message.append( |
| 124 self._('%(classname)s %(itemid)s has been retired')%{ | 124 self._('%(classname)s %(itemid)s has been retired')%{ |
| 125 'classname': self.classname.capitalize(), 'itemid': nodeid}) | 125 'classname': self.classname.capitalize(), 'itemid': nodeid}) |
| 126 | |
| 127 def hasPermission(self, permission, classname=Action._marker, itemid=None): | |
| 128 if itemid is None: | |
| 129 itemid = self.nodeid | |
| 130 return self.hasPermission(permission, classname, itemid) | |
| 126 | 131 |
| 127 class SearchAction(Action): | 132 class SearchAction(Action): |
| 128 name = 'search' | 133 name = 'search' |
| 129 permissionType = 'View' | 134 permissionType = 'View' |
| 130 | 135 |
