ansible/portal-plugin-sdk¶
Shared frontend web library for Portal contributors. Source:
workspaces/portal-core/plugins/portal-plugin-sdk.
Reusable functionality¶
- Page headers, dialogs, empty states, links, and loading components.
- Notification stack and synchronization polling utilities.
- Pagination, cache, and subscription utilities.
- Context/authorization hooks, icons, styles, and theme utilities.
The SDK is not a host page plugin and does not register native contributions. Use portal-extension-api for Blueprint declarations and portal-extension-host for host rendering.
Styling and ownership¶
Prefer shared components and theme-adaptive tokens over importing private RHDH UI implementation details. Synchronization/cache integration uses injected callbacks rather than direct imports of a content plugin.
Authenticated context¶
usePortalContext() discovers portal-operations and reads its authenticated
GET /context endpoint. It returns organizationIds, an optional
organizationId, userEntityRef, loading, and error. A single unambiguous
membership supplies organizationId; multiple memberships do not select one.
Resolution failures leave an empty membership list, not a default fallback.
Use this context for display. Do not infer AAP membership from the user's catalog namespace or use browser-supplied organization values as backend authority. Registered operations receive only subject and input; the backend independently resolves memberships, grants and permissions.
See design tokens and the implementation guide for the remaining content-client and picker boundary.