Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/http-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ case "$group" in
;;
organization-search)
GITLAB_CSV_E2E_BASE_URL="$local_app_url" \
GITLAB_CSV_E2E_LARGE_IMPORT=1 \
GITLAB_CSV_E2E_REPORT_PATH="$report_dir/gitlab-csv-permissions-http-report.json" \
bun --no-env-file scripts/test-gitlab-csv-permissions-e2e.ts
ORGANIZATION_SEARCH_E2E_BASE_URL="$local_app_url" \
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docs-negotiation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ jobs:
run: bun run --cwd apps/docs test:headers:e2e
- name: Verify GitLab CSV export over HTTPS
run: python3 apps/docs/scripts/test-gitlab-export-e2e.py
- name: Verify permission imports over HTTPS
env:
PERMISSION_UPLOAD_REPORT_PATH: apps/docs/test-results/permission-upload-e2e.json
run: python3 apps/docs/scripts/test-permission-upload-e2e.py
- name: Bound the generated content cache
if: always()
run: bash .github/actions/docs-content-cache/prune.sh content
Expand Down
96 changes: 96 additions & 0 deletions apps/docs/content/docs/cli/organizations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,102 @@ sim organizations search sources permissions get <sourceId> [options]

API request and response schemas: [getSearchSourcePermissions](/api-reference/organizations/getSearchSourcePermissions).

### Create source permission import

```bash
sim organizations search sources permissions imports create <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--provider <value>` | Yes | Provider of the configured source. |
| `--expected-revision <value>` | Yes | Permission revision pinned before exporting the CSVs. |
| `--user-mapping <json\|@file>` | Yes | Complete user identity mapping. (JSON, or @path / @- to read a file or stdin). |
| `--project-permissions <json\|@file>` | Yes | Complete project membership snapshot. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

API request and response schemas: [createSourcePermissionImport](/api-reference/organizations/createSourcePermissionImport).

### Complete source permission import

This replaces the source’s permission grants. Readers omitted from the new grants lose access.

```bash
sim organizations search sources permissions imports complete <sourceId> <importId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |
| `importId` | Yes | Permission import identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [completeSourcePermissionImport](/api-reference/organizations/completeSourcePermissionImport).

### Upload source permission import part

```bash
sim organizations search sources permissions imports put-part <sourceId> <importId> <partNumber> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |
| `importId` | Yes | Permission import identifier. |
| `partNumber` | Yes | Zero-based part number across both files; user mapping comes first. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--field <value>` | Yes | CSV file this part belongs to. Accepted values: `userMapping`, `projectPermissions`. |
| `--content <value\|@file>` | Yes | Complete CSV records, at most 5,000 rows and 1 MiB of UTF-8; an optional header may appear in each part. (@path / @- reads a file or stdin verbatim, including trailing newlines; @@value for a literal leading @). |

</CommandTable>

API request and response schemas: [putSourcePermissionImportPart](/api-reference/organizations/putSourcePermissionImportPart).

### Replace search source permissions

OAuth login or personal API key required.
Expand Down
232 changes: 167 additions & 65 deletions apps/docs/content/docs/cli/reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3978,6 +3978,173 @@ sim organizations access-requests resolve <requestId> [options]

API request and response schemas: [resolveOrganizationAccessRequest](/api-reference/access-requests/resolveOrganizationAccessRequest).

### sim organizations search sources permissions imports complete

Complete source permission import

This replaces the source’s permission grants. Readers omitted from the new grants lose access.

```bash
sim organizations search sources permissions imports complete <sourceId> <importId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |
| `importId` | Yes | Permission import identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [completeSourcePermissionImport](/api-reference/organizations/completeSourcePermissionImport).

### sim organizations search sources permissions imports create

Create source permission import

```bash
sim organizations search sources permissions imports create <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--provider <value>` | Yes | Provider of the configured source. |
| `--expected-revision <value>` | Yes | Permission revision pinned before exporting the CSVs. |
| `--user-mapping <json\|@file>` | Yes | Complete user identity mapping. (JSON, or @path / @- to read a file or stdin). |
| `--project-permissions <json\|@file>` | Yes | Complete project membership snapshot. (JSON, or @path / @- to read a file or stdin). |

</CommandTable>

API request and response schemas: [createSourcePermissionImport](/api-reference/organizations/createSourcePermissionImport).

### sim organizations search sources permissions imports put-part

Upload source permission import part

```bash
sim organizations search sources permissions imports put-part <sourceId> <importId> <partNumber> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Search source identifier. |
| `importId` | Yes | Permission import identifier. |
| `partNumber` | Yes | Zero-based part number across both files; user mapping comes first. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--field <value>` | Yes | CSV file this part belongs to. Accepted values: `userMapping`, `projectPermissions`. |
| `--content <value\|@file>` | Yes | Complete CSV records, at most 5,000 rows and 1 MiB of UTF-8; an optional header may appear in each part. (@path / @- reads a file or stdin verbatim, including trailing newlines; @@value for a literal leading @). |

</CommandTable>

API request and response schemas: [putSourcePermissionImportPart](/api-reference/organizations/putSourcePermissionImportPart).

### sim organizations search sources permissions get

Get search source permission revision (OAuth login or personal API key required)

```bash
sim organizations search sources permissions get <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Identifier of the configured Search source. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |

</CommandTable>

API request and response schemas: [getSearchSourcePermissions](/api-reference/organizations/getSearchSourcePermissions).

### sim organizations search sources permissions replace

Replace search source permissions (OAuth login or personal API key required)

This replaces the source’s permission grants. Readers omitted from the new grants lose access.

```bash
sim organizations search sources permissions replace <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Identifier of the configured Search source. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--expected-revision <value>` | Yes | Permission revision read before exporting the grants. |
| `--permissions <json\|@file>` | Yes | Complete permission grants in the source provider’s format. (JSON, or @path / @- to read a file or stdin). |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [replaceSearchSourcePermissions](/api-reference/organizations/replaceSearchSourcePermissions).

### sim organizations invitations create

Create organization invitation (OAuth login or personal API key required)
Expand Down Expand Up @@ -4609,71 +4776,6 @@ sim organizations usage events [options]

API request and response schemas: [listOrganizationUsageEvents](/api-reference/organizations/listOrganizationUsageEvents).

### sim organizations search sources permissions get

Get search source permission revision (OAuth login or personal API key required)

```bash
sim organizations search sources permissions get <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Identifier of the configured Search source. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |

</CommandTable>

API request and response schemas: [getSearchSourcePermissions](/api-reference/organizations/getSearchSourcePermissions).

### sim organizations search sources permissions replace

Replace search source permissions (OAuth login or personal API key required)

This replaces the source’s permission grants. Readers omitted from the new grants lose access.

```bash
sim organizations search sources permissions replace <sourceId> [options]
```

**Arguments**

<CommandTable>

| Argument | Required | Description |
| --- | --- | --- |
| `sourceId` | Yes | Identifier of the configured Search source. |

</CommandTable>

**Options**

<CommandTable>

| Option | Required | Description |
| --- | --- | --- |
| `--organization <value>` | Yes | Organization identifier. |
| `--expected-revision <value>` | Yes | Permission revision read before exporting the grants. |
| `--permissions <json\|@file>` | Yes | Complete permission grants in the source provider’s format. (JSON, or @path / @- to read a file or stdin). |
| `-y, --yes` | Yes | Confirm this operation. |

</CommandTable>

API request and response schemas: [replaceSearchSourcePermissions](/api-reference/organizations/replaceSearchSourcePermissions).

### sim organizations list

List organizations (OAuth login or personal API key required)
Expand Down
Loading
Loading