diff --git a/docs/connector.mdx b/docs/connector.mdx index 44b9279a..626f1f1e 100644 --- a/docs/connector.mdx +++ b/docs/connector.mdx @@ -500,6 +500,7 @@ Enabling **Optimize sync for large organizations** (env var: `BATON_DIRECT_COLLA - **Direct collaborators only.** GitHub is asked only for users with direct repository access. Team-based access is reconstructed from team membership, which the connector already syncs separately. - **Skips per-team detail calls.** The `members_count` and `repos_count` profile fields are not synced for team resources. +- **Inherited access in grant and revoke.** Grant and revoke behave the same with or without this option. A repository grant checks the user's effective access first. If the effective permission level is exactly the requested level, the grant returns "already exists" and no direct collaborator record is created. If the effective level is higher or lower, the grant still adds a direct collaborator. Effective access includes access through a team, the organization base permission, and organization ownership. With this option on, the sync lists only direct collaborators. A user with only inherited access can show a fulfilled grant in C1 and have no direct collaborator record on GitHub. A repository revoke removes only the direct collaborator or invitation. It does not change team or organization access, so the user can keep access after a revoke. **Enable this option if** your GitHub organization has thousands of repositories or thousands of members and you want faster syncs and fewer API calls. Repository access data in C1 is equivalent — only the way grants are sourced (direct vs. team-expanded) differs. diff --git a/docs/docs-info.md b/docs/docs-info.md index 05b4d086..23951a0d 100644 --- a/docs/docs-info.md +++ b/docs/docs-info.md @@ -73,7 +73,7 @@ `--sync-secrets` — sync fine-grained personal access tokens as API keys `--sync-last-activity` — emit the audit-log usage event feed. Hidden from `--help` and from the GUI config here, because it only applies to GitHub Enterprise audit-log access; `baton-github-enterprise` sets it directly instead of going through this CLI layer `--omit-archived-repositories` — skip archived repositories - `--direct-collaborators-only` — reduce API calls on large organizations + `--direct-collaborators-only` — reduce API calls on large organizations. Grant and revoke do not depend on this option. Grant returns `GrantAlreadyExists` only when the effective permission level is exactly the requested level. Effective access includes access through a team, the organization base permission, or organization ownership. No direct collaborator record is created in that case. If the effective level is higher or lower, Grant still adds a direct collaborator. Revoke removes only the direct collaborator or invitation, so inherited access stays 2. **For each item in the list above:** - **How does a user create or look up that credential or info?** @@ -169,7 +169,7 @@ - **Parent**: Organization - **Entitlements**: `pull`, `triage`, `push`, `maintain`, `admin` (permission), grantable to users and teams, and declared as an exclusion group because a principal holds one level at a time - **Grants**: One grant per collaborator for their permission level, and one per team with repository access. The organization's `default_repository_permission` is expanded into the cumulative levels it implies and emitted against the organization, annotated as expandable through the org's `member` and `admin` entitlements -- **Provisioning**: Grant and Revoke add or remove a collaborator, or a team's repository access +- **Provisioning**: Grant and Revoke add or remove a collaborator, or a team's repository access. Grant skips a user whose effective permission level, through a team, the organization base permission, or organization ownership, is exactly the requested level. Otherwise Grant adds a direct collaborator. Revoke removes only the direct collaborator or invitation - **Note**: `--omit-archived-repositories` skips archived repositories. `--direct-collaborators-only` relies on grant expansion for team access instead of fetching per-team detail ### Organization roles