repo-api: allow repo admins to get/set settings. Previously it was only super-admins that could do that, and it's wrong.

This commit is contained in:
Marcin Kuzminski 2020-08-13 11:11:24 +02:00
parent e564aec523
commit 7e4cac8421
2 changed files with 14 additions and 14 deletions

View file

@ -170,8 +170,7 @@ def validate_repo_permissions(apiuser, repoid, repo, perms):
"""
if not HasRepoPermissionAnyApi(*perms)(
user=apiuser, repo_name=repo.repo_name):
raise JSONRPCError(
'repository `%s` does not exist' % repoid)
raise JSONRPCError('repository `%s` does not exist' % repoid)
return True