Mercurial > p > roundup > code
diff roundup/rest.py @ 7983:dd229bbdd32d
issue 2551353 - add roundup-classhelper
Add test for rest/data/user/roles endpoint. Fix allow header returned
from endpoint to allow GET only.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 22 May 2024 19:36:00 -0400 |
| parents | fe0348bbe45b |
| children | 8e310a7b5e09 |
line wrap: on
line diff
--- a/roundup/rest.py Wed May 22 19:09:26 2024 -0400 +++ b/roundup/rest.py Wed May 22 19:36:00 2024 -0400 @@ -1040,6 +1040,11 @@ raise Unauthorised( 'User does not have permission on "user.roles"') + self.client.setHeader( + "Allow", + "GET" + ) + return 200, {"collection": [{"id": rolename,"name": rolename} for rolename in list(self.db.security.role.keys())]}
