Skip to content

Commit 36cd60a

Browse files
committed
API v2: allow listing when using private repos
1 parent 611d35c commit 36cd60a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

readthedocs/api/v2/views/model_views.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ class DisableListEndpoint:
8484
"""
8585

8686
def list(self, *args, **kwargs):
87+
# Using private repos will only list resources the user has access to.
88+
if settings.ALLOW_PRIVATE_REPOS:
89+
return super().list(*args, **kwargs)
90+
8791
disabled = True
8892

8993
# NOTE: keep list endpoint that specifies a resource

0 commit comments

Comments
 (0)