Skip to content

Commit fcbe32c

Browse files
committed
External status: use admin users to hit VCS API
We were using `AdminPermission.members`. However, that will return `RemoteRepositoryRelation.admin=False`, so those users may not have permissions to update the VCS status. By using `AdminPermission.admins` we are sure the user selected will have permissions to make this request.
1 parent ccdad23 commit fcbe32c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/builds/tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def send_build_status(build_pk, commit, status, link_to_build=False):
408408
# Use ``user_in=`` instead of ``user__projects=`` here
409409
# because User's are not related to Project's directly in
410410
# Read the Docs for Business
411-
user__in=AdminPermission.members(build.project),
411+
user__in=users,
412412
).select_related('account', 'user').only('user', 'account')
413413
)
414414

0 commit comments

Comments
 (0)