Skip to content

Plugin group config in group requests#548

Draft
somethingnew2-0 wants to merge 3 commits into
mainfrom
pcollins/pr-502-rebase-plugin-config-7c13de
Draft

Plugin group config in group requests#548
somethingnew2-0 wants to merge 3 commits into
mainfrom
pcollins/pr-502-rebase-plugin-config-7c13de

Conversation

@somethingnew2-0

Copy link
Copy Markdown
Collaborator

Takes over and rebases #502 (originally by @barborico) onto current main.

What

Lets a requester supply app-group-lifecycle plugin group config when requesting an app group, and a resolver edit it before approval, so the group created on approval is already configured and the plugin's group_created hook runs against a configured group. Today that config is only collectable in the direct group create/edit flow, so approving a requested group leaves it unconfigured.

  • Two JSON columns on GroupRequest (requested_plugin_data, resolved_plugin_data) mirroring the existing requested_*/resolved_* pairs, plus a migration. Stored in the same shape as a group's plugin_data; no status is kept (the hook populates that post-creation).
  • CreateGroupRequest persists the requested config; the POST route validates it against the app's plugin (400 up front). ApproveGroupRequest resolves resolved-over-requested, re-validates defensively, and sets it on the new AppGroup before CreateGroup runs. The resolve (PUT) route lets a resolver edit it.
  • The create/read request UIs render the existing plugin config form when the target app has a lifecycle plugin.

This is a generic capability — it works with any app-group-lifecycle plugin, not a specific one.

Rebase notes

Like #498, #502 predates the async-SQLAlchemy migration (#480/#481), the uv/ty toolchain (#507), the async plugin interface (#511), the Okta SDK v3 upgrade (#509), and the api/manage.pyapi/cli.py rename (#520). This branch is a fresh, async-native re-application onto current main: the group-request operations/router additions were fit to the awaited async paths (e.g. await db.session.get(...) in approval), the migration's down_revision was re-pointed to the current head, and the generated client was regenerated. It is independent of the #498/#532 rebase (a sibling, not stacked) — it builds only on plugin-config infrastructure already on main.

Complements #532 (the Google group manager plugin) but does not depend on it; the two overlap only trivially (the generated client and a one-line setupTests.ts fix). See #502's original description for the functional walkthrough.

Rebase and async conversion by Claude; original design and implementation by @barborico in #502.

🤖 Generated with Claude Code

somethingnew2-0 and others added 3 commits July 16, 2026 16:30
Add two JSON columns to GroupRequest -- requested_plugin_data (supplied with the
request) and resolved_plugin_data (a resolver-editable copy) -- mirroring the
existing requested_*/resolved_* pairs, plus the Alembic migration. Config is
stored in the same shape as a group's plugin_data ({plugin_id: {configuration:
{...}}}); no status is kept, since the lifecycle hook populates that after the
group is created. Surface both on GroupRequestDetail, requested_plugin_data on
the app-group create body, and resolved_plugin_data on the resolve body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Let a requester supply app-group-lifecycle plugin config when requesting an app
group, and a resolver edit it before approval, so the group created on approval
is configured and the plugin's group_created hook runs against it:

- CreateGroupRequest persists requested_plugin_data; the POST router validates
  it against the app's plugin (400 on invalid/missing-required).
- ApproveGroupRequest resolves resolved_plugin_data or requested_plugin_data,
  re-validates it defensively (the app/config may have changed since filing),
  and sets it on the new AppGroup *before* CreateGroup runs so group_created
  sees the configured group.
- The resolve (PUT) handler copies resolved_plugin_data so a resolver can edit
  before approving.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Render the existing AppGroupLifecyclePluginConfigurationForm for app-group
requests whose target app has a lifecycle plugin: the create dialog submits
requested_plugin_data, and the resolver's read view pre-fills with the
requester's config and submits resolved_plugin_data. Small DOM-free helpers
(pluginConfig.ts) with unit tests. Regenerate the API client for the new request
plugin_data fields. Also fix a pre-existing jest-dom v6 import in setupTests.ts
(the /extend-expect subpath was dropped) so the frontend test suite runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant