Changeset - 4707d09d49a6
[Not reviewed]
default
0 2 0
Mads Kiilerich - 7 years ago 2018-06-04 14:26:37
mads@kiilerich.com
repos: make edit_permissions_revoke controller return an actual (empty) body on success

The code 204 was slightly confusing even though technically OK.
2 files changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/controllers/admin/repos.py
Show inline comments
 
@@ -355,6 +355,7 @@ class ReposController(BaseRepoController
 
            h.flash(_('An error occurred during revoking of permission'),
 
                    category='error')
 
            raise HTTPInternalServerError()
 
        return []
 

	
 
    @HasRepoPermissionLevelDecorator('admin')
 
    def edit_fields(self, repo_name):
kallithea/tests/functional/test_admin_permissions.py
Show inline comments
 
@@ -125,5 +125,5 @@ class TestAdminPermissionsController(Tes
 
                obj_type='user',
 
                user_id=user.user_id,
 
                _authentication_token=self.authentication_token()),
 
            status=204) # success has no content
 
            status=200)
 
        assert not response.body
0 comments (0 inline, 0 general)