Align administration guide details with current handlers

Use the accepted organisation ID alphabet and canonical resource types, and expect the documented role assignments to return 204. Keep the guide lifecycle checks at the existing API contract.

Contract-Neutral: Documentation and test expectations only; API methods, validation, authentication and tenant isolation are unchanged.
Change-source: pulse-maintainer
This commit is contained in:
pulse-triage[bot] 2026-10-01 08:44:10 +01:00
parent 0e06f2b38b
commit 2c98baabea
5 changed files with 24 additions and 20 deletions

View file

@ -1178,7 +1178,7 @@ Returns organizations accessible to the authenticated user.
```json
{ "id": "acme-corp", "displayName": "Acme Corporation" }
```
The creator becomes the owner and first member. Organization IDs must be lowercase alphanumeric with hyphens, 3-64 characters.
The creator becomes the owner and first member. Organization IDs use letters, digits, periods, underscores or hyphens, 1–64 characters, but cannot be `.` or `..`. Prefer a simple lowercase/hyphen ID such as the example.
### Get Organization
`GET /api/orgs/{id}` (requires `settings:read`)
@ -1229,7 +1229,7 @@ Returns resources shared inbound to this organization from other organizations.
"accessRole": "viewer"
}
```
Share a resource with another organization. Valid resource types: `vm`, `container`, `agent`, `storage`, `pbs`, `pmg` (not `host`). Access roles: `viewer`, `editor`, `admin`. Admin or owner role required on the source org. The share is pending until a target-org admin or owner accepts it in Pulse; changing its access role requires acceptance again.
Share a resource with another organization, using the resource type and ID returned by Pulse. Supported types include `vm`, `system-container`, `agent`, `node`, `docker-host`, `storage`, `pbs` and `pmg`; generic `host` and `container` types are not supported. Access roles: `viewer`, `editor`, `admin`. Admin or owner role required on the source org. The share is pending until a target-org admin or owner accepts it in Pulse; changing its access role requires acceptance again.
### Delete Share
`DELETE /api/orgs/{id}/shares/{shareId}` (requires `settings:write`, session auth only)

View file

@ -87,9 +87,10 @@ the relevant redacted error, not whole member or infrastructure responses.
{"id": "production-datacenter", "displayName": "Production Datacenter"}
```
The creator becomes the owner. `id` is a lowercase alphanumeric/hyphen ID
(3–64 characters); `displayName` is the name shown in Pulse. `name` and
`description` are not the creation fields.
The creator becomes the owner. `id` is a stable ID of 1–64 characters using
letters, digits, periods, underscores or hyphens, but not `.` or `..`; use a
simple lowercase/hyphen ID such as the example. `displayName` is the name
shown in Pulse. `name` and `description` are not the creation fields.
### Switching Organizations
@ -145,10 +146,11 @@ Until acceptance, the share is pending and does not grant access.
}
```
Use `accessRole`, not `role`. Supported resource types are `vm`, `container`,
`agent`, `storage`, `pbs` and `pmg`; `host` is not supported. Use the resource ID
returned by Pulse, not a display name. Changing a share's access role makes it
pending again, so the target must accept the new grant.
Use `accessRole`, not `role`, and the resource type and ID returned by Pulse,
not a display name. Supported types include `vm`, `system-container`, `agent`,
`node`, `docker-host`, `storage`, `pbs` and `pmg`; the generic types `host` and
`container` are not supported. Changing a share's access role makes it pending
again, so the target must accept the new grant.
**Read-only incoming shares:**
```bash

View file

@ -1178,7 +1178,7 @@ Returns organizations accessible to the authenticated user.
```json
{ "id": "acme-corp", "displayName": "Acme Corporation" }
```
The creator becomes the owner and first member. Organization IDs must be lowercase alphanumeric with hyphens, 3-64 characters.
The creator becomes the owner and first member. Organization IDs use letters, digits, periods, underscores or hyphens, 1–64 characters, but cannot be `.` or `..`. Prefer a simple lowercase/hyphen ID such as the example.
### Get Organization
`GET /api/orgs/{id}` (requires `settings:read`)
@ -1229,7 +1229,7 @@ Returns resources shared inbound to this organization from other organizations.
"accessRole": "viewer"
}
```
Share a resource with another organization. Valid resource types: `vm`, `container`, `agent`, `storage`, `pbs`, `pmg` (not `host`). Access roles: `viewer`, `editor`, `admin`. Admin or owner role required on the source org. The share is pending until a target-org admin or owner accepts it in Pulse; changing its access role requires acceptance again.
Share a resource with another organization, using the resource type and ID returned by Pulse. Supported types include `vm`, `system-container`, `agent`, `node`, `docker-host`, `storage`, `pbs` and `pmg`; generic `host` and `container` types are not supported. Access roles: `viewer`, `editor`, `admin`. Admin or owner role required on the source org. The share is pending until a target-org admin or owner accepts it in Pulse; changing its access role requires acceptance again.
### Delete Share
`DELETE /api/orgs/{id}/shares/{shareId}` (requires `settings:write`, session auth only)

View file

@ -87,9 +87,10 @@ the relevant redacted error, not whole member or infrastructure responses.
{"id": "production-datacenter", "displayName": "Production Datacenter"}
```
The creator becomes the owner. `id` is a lowercase alphanumeric/hyphen ID
(3–64 characters); `displayName` is the name shown in Pulse. `name` and
`description` are not the creation fields.
The creator becomes the owner. `id` is a stable ID of 1–64 characters using
letters, digits, periods, underscores or hyphens, but not `.` or `..`; use a
simple lowercase/hyphen ID such as the example. `displayName` is the name
shown in Pulse. `name` and `description` are not the creation fields.
### Switching Organizations
@ -145,10 +146,11 @@ Until acceptance, the share is pending and does not grant access.
}
```
Use `accessRole`, not `role`. Supported resource types are `vm`, `container`,
`agent`, `storage`, `pbs` and `pmg`; `host` is not supported. Use the resource ID
returned by Pulse, not a display name. Changing a share's access role makes it
pending again, so the target must accept the new grant.
Use `accessRole`, not `role`, and the resource type and ID returned by Pulse,
not a display name. Supported types include `vm`, `system-container`, `agent`,
`node`, `docker-host`, `storage`, `pbs` and `pmg`; the generic types `host` and
`container` are not supported. Changing a share's access role makes it pending
again, so the target must accept the new grant.
**Read-only incoming shares:**
```bash

View file

@ -77,8 +77,8 @@ func TestAdminDocsCustomRoleLifecycle(t *testing.T) {
}{
{http.MethodPost, "/api/admin/roles", adminDocBodies(t, "RBAC", "Creating a Role")[0], h.HandleRoles, http.StatusOK},
{http.MethodPut, "/api/admin/roles/alert-manager", adminDocBodies(t, "RBAC", "Updating a Role")[0], h.HandleRoles, http.StatusOK},
{http.MethodPut, "/api/admin/users/jane/roles", assignments[0], h.HandleUserRoleActions, http.StatusOK},
{http.MethodPut, "/api/admin/users/jane/roles", assignments[1], h.HandleUserRoleActions, http.StatusOK},
{http.MethodPut, "/api/admin/users/jane/roles", assignments[0], h.HandleUserRoleActions, http.StatusNoContent},
{http.MethodPut, "/api/admin/users/jane/roles", assignments[1], h.HandleUserRoleActions, http.StatusNoContent},
{http.MethodDelete, "/api/admin/users/jane", nil, h.HandleUserRoleActions, http.StatusNoContent},
{http.MethodDelete, "/api/admin/roles/alert-manager", nil, h.HandleRoles, http.StatusNoContent},
}