Skip to content

Commit

Permalink
Add an access restriction to log to connect with just one repository …
Browse files Browse the repository at this point in the history
…by uuid
  • Loading branch information
helllllllder committed Jul 19, 2021
1 parent 56f14d7 commit 9944849
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bothub/api/v2/repository/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def filter_repository_version(self, queryset, name, value):
request = self.request
try:
repository = RepositoryVersion.objects.get(pk=value).repository
if str(repository.repository.uuid) != "1e8848b2-bdf9-40a1-b4c1-a79882e970e7":
raise PermissionDenied()
authorization = repository.get_user_authorization(request.user)
if not authorization.can_contribute:
raise PermissionDenied()
Expand Down

0 comments on commit 9944849

Please sign in to comment.