Skip to content

Commit d6f7347

Browse files
authored
API v2: allow listing when using private repos (#8192)
1 parent f4c0a21 commit d6f7347

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

readthedocs/api/v2/views/model_views.py

+4
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 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)