You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the algorithm of checking organization whitelist is to call
api /orgs/%s/members which requires the organization members to be publicly visible.
I think we can call api /user/orgs to get current user's orgs and check whether the login field of each org item is in the configured org_whitelist
Pros and Cons of this method:
Pros:
only one api call (/user/orgs) to check user's membership instead of call (/orgs/%s/members) for each configured organization
even organization members is not publicly visible, user's membership of organization can be checked correctly
Cons:
require permission of user scope instead of read:user scope of the login user
The text was updated successfully, but these errors were encountered:
You can already get access to private GitHub org memberships by changing .scope. The exact rules are a bit complicated though, for some discussion see:
Currently the algorithm of checking organization whitelist is to call
api
/orgs/%s/members
which requires the organization members to be publicly visible.I think we can call api
/user/orgs
to get current user's orgs and check whether thelogin
field of each org item is in the configuredorg_whitelist
Pros and Cons of this method:
Pros:
/user/orgs
) to check user's membership instead of call (/orgs/%s/members
) for each configured organizationCons:
user
scope instead ofread:user
scope of the login userThe text was updated successfully, but these errors were encountered: