Mercurial > p > roundup > code
comparison roundup/security.py @ 5110:87b0358790ed
Adding some tests for admin.py. Specifically for issue2550572: setting
nosy=+foo on multiple issues gives them all the same exact nosy
list.
To make this work had to change the admin.py code to use
"sys.stdout.write" in place of "print". In the test I now hijack
stdout.write following an existing example of this for admin's
import/export command that hijacks sys.stderr.write.
Also I corrected a misspelling in security.py. The word "everything"
was misspelled. It is not inside _() markers so I don't think it's
going to affect translation and grepping the locale subdir doesn't
show the original string.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 29 Jun 2016 18:35:19 -0400 |
| parents | 8137456a86f3 |
| children | 425b4c4fc345 |
comparison
equal
deleted
inserted
replaced
| 5109:43a1f7fe39f5 | 5110:87b0358790ed |
|---|---|
| 126 self.addRole(name="Anonymous", description="An anonymous user") | 126 self.addRole(name="Anonymous", description="An anonymous user") |
| 127 | 127 |
| 128 # default permissions - Admin may do anything | 128 # default permissions - Admin may do anything |
| 129 for p in 'create edit retire view'.split(): | 129 for p in 'create edit retire view'.split(): |
| 130 p = self.addPermission(name=p.title(), | 130 p = self.addPermission(name=p.title(), |
| 131 description="User may %s everthing"%p) | 131 description="User may %s everything"%p) |
| 132 self.addPermissionToRole('Admin', p) | 132 self.addPermissionToRole('Admin', p) |
| 133 | 133 |
| 134 # initialise the permissions and roles needed for the UIs | 134 # initialise the permissions and roles needed for the UIs |
| 135 from roundup.cgi import client | 135 from roundup.cgi import client |
| 136 client.initialiseSecurity(self) | 136 client.initialiseSecurity(self) |
