Mercurial > p > roundup > code
diff test/rest_common.py @ 5604:ed02a1e0aa5d REST-rebased
Fix actions
Permission for retire in roundup/actions.py was with 'Edit' permission,
not 'Retire' permission. Add a 'restore' action to roundup/actions.py.
Both are now correctly used in rest.py and xmlrpc.py (the latter had
some errors when printint error messages).
Also reworked the rest implementation: Despite the warnings in the
roundup API in hyperdb.py the DELETE http method would *destroy* and not
*retire* an item. This has been fixed. We also do not allow retire of a
complete class (although this was implemented) because this seems to
dangerous and we see no use-case.
| author | Ralf Schlatterbeck <rsc@runtux.com> |
|---|---|
| date | Wed, 30 Jan 2019 14:12:27 +0100 |
| parents | c40d04915e23 |
| children | 1c4adab65faf |
line wrap: on
line diff
--- a/test/rest_common.py Wed Jan 30 13:58:18 2019 +0100 +++ b/test/rest_common.py Wed Jan 30 14:12:27 2019 +0100 @@ -39,6 +39,9 @@ self.db.commit() self.db.close() self.db = self.instance.open('joe') + # Allow joe to retire + p = self.db.security.addPermission(name='Retire', klass='issue') + self.db.security.addPermissionToRole('User', p) self.db.tx_Source = 'web'
