Mercurial > p > roundup > code
comparison test/test_xmlrpc.py @ 5197:d957f4e9fd58
Trying to debug test failures on travis-ci that I can't reproduce
locally on two of my systems.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Mar 2017 11:37:46 -0400 |
| parents | e9801faebbe4 |
| children | f070841dee95 |
comparison
equal
deleted
inserted
replaced
| 5196:e0732fd6a6c7 | 5197:d957f4e9fd58 |
|---|---|
| 201 self.db.security.addRole(name='Project') | 201 self.db.security.addRole(name='Project') |
| 202 self.db.security.addPermissionToRole('User', 'Web Access') | 202 self.db.security.addPermissionToRole('User', 'Web Access') |
| 203 self.db.security.addPermissionToRole('Project', 'Web Access') | 203 self.db.security.addPermissionToRole('Project', 'Web Access') |
| 204 # Allow viewing keyword | 204 # Allow viewing keyword |
| 205 p = self.db.security.addPermission(name='View', klass='keyword') | 205 p = self.db.security.addPermission(name='View', klass='keyword') |
| 206 print "View keyword class: %r"p | |
| 206 self.db.security.addPermissionToRole('User', p) | 207 self.db.security.addPermissionToRole('User', p) |
| 207 # Allow viewing interesting things (but not keyword) on issue | 208 # Allow viewing interesting things (but not keyword) on issue |
| 208 # But users might only view issues where they are on nosy | 209 # But users might only view issues where they are on nosy |
| 209 # (so in the real world the check method would be better) | 210 # (so in the real world the check method would be better) |
| 210 p = self.db.security.addPermission(name='View', klass='issue', | 211 p = self.db.security.addPermission(name='View', klass='issue', |
| 211 properties=("title", "status"), check=lambda x,y,z: True) | 212 properties=("title", "status"), check=lambda x,y,z: True) |
| 213 print "View keyword class w/ props: %r"p | |
| 212 self.db.security.addPermissionToRole('User', p) | 214 self.db.security.addPermissionToRole('User', p) |
| 213 # Allow role "Project" access to whole issue | 215 # Allow role "Project" access to whole issue |
| 214 p = self.db.security.addPermission(name='View', klass='issue') | 216 p = self.db.security.addPermission(name='View', klass='issue') |
| 215 self.db.security.addPermissionToRole('Project', p) | 217 self.db.security.addPermissionToRole('Project', p) |
| 216 # Allow all access to status: | 218 # Allow all access to status: |
| 235 | 237 |
| 236 # Conditionally allow view of whole issue (check is False here, | 238 # Conditionally allow view of whole issue (check is False here, |
| 237 # this might check for keyword owner in the real world) | 239 # this might check for keyword owner in the real world) |
| 238 p = self.db.security.addPermission(name='View', klass='issue', | 240 p = self.db.security.addPermission(name='View', klass='issue', |
| 239 check=lambda x,y,z: False) | 241 check=lambda x,y,z: False) |
| 242 print "View issue class: %r"p | |
| 240 self.db.security.addPermissionToRole('User', p) | 243 self.db.security.addPermissionToRole('User', p) |
| 241 # Allow user to search for issue.status | 244 # Allow user to search for issue.status |
| 242 p = self.db.security.addPermission(name='Search', klass='issue', | 245 p = self.db.security.addPermission(name='Search', klass='issue', |
| 243 properties=("status",)) | 246 properties=("status",)) |
| 247 print "View Search class w/ props: %r"p | |
| 244 self.db.security.addPermissionToRole('User', p) | 248 self.db.security.addPermissionToRole('User', p) |
| 245 | 249 |
| 246 keyw = {'keyword':self.db.keyword.lookup('d1')} | 250 keyw = {'keyword':self.db.keyword.lookup('d1')} |
| 247 stat = {'status':self.db.status.lookup('open')} | 251 stat = {'status':self.db.status.lookup('open')} |
| 248 keygroup = keysort = [('+', 'keyword')] | 252 keygroup = keysort = [('+', 'keyword')] |
