Repository navigation
feat: Phase 11 organization admin console and migration plan - #750
Merged
Merged
Conversation
|
@Gbolahan088 is attempting to deploy a commit to the Ayinkx Team on Vercel. A member of the Team first needs to authorize it. |
|
@Gbolahan088 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 11 organization admin console for the workspace-based organization model.
This repo has no separate organization table — a workspace is the organization (as already documented in
app/models/workspace_domain.pyandapp/models/audit_log.py). So instead of adding a parallel model and permission system, this adds a thinapp/services/organizations.pylayer: the workspace owner is the organization owner, and an activeWorkspaceMemberwith roleowner/adminis an organization admin. Every console route resolves authorization through one helper (app/admin/organizations_common.py::resolve_organization), which fails closed with structuredforbidden/not_found/invalid_inputerrors.Closes #626
Closes #627
Closes #633
Closes #636
Per issue
#626 — organization admin dashboard
GET /admin/organizations/<id>renders member count, workspace count, estimated usage for a selectable window (1–365 days), and open high/critical security findings.app/admin/organization_dashboard.py,app/services/organizations.py,app/templates/admin/organization_dashboard.html, tests.#627 — member management UI
GET/POST /admin/organizations/<id>/members: invite, suspend, restore, remove, and change role.confirmfield) and disabled client-side while submitting (app/static/js/org-admin.js,aria-busy).WorkspaceMember.mark_removed()and cancel pending invitations on remove.app/admin/organization_members.py,app/templates/admin/organization_members.html, tests.#633 — usage and billing rollups
GET /admin/organizations/<id>/usagereuses the Phase 10usage_ledgersummary and budget evaluations, scoped to the organization's workspaces.cost_is_estimate,usage_is_estimated) and no provider invoice is implied.app/admin/organization_usage.py,app/templates/admin/organization_usage.html, tests.#636 — enterprise migration plan
scripts/organization_migration.pywith idempotent--dry-run(default),--apply,--verify,--rollbackfor scoping existing workspaces to an owner without copying data.docs/organization-migration.mddocuments backfill, rollback, verification SQL, expected output, and the explicit no-data-loss model.Verification
No schema changes were needed, so the migration head is unchanged.
Notes and limitations
suspendandremoveshare the existingremovedmembership status (removeadditionally cancels pending invitations); the UI distinguishes them but the stored status is shared. Adding a distinctsuspendedstatus would need a migration, so it was left alone.adminrole is console-only and deliberately does not widenapp/services/permissions.pycapabilities./adminbehaviour; successes use flash + redirect.tests/test_admin_usage_report.py::TestAdminUsageReportAccess::test_admin_navigation_link_is_visible_only_to_adminsfails on a cleanorigin/maintoo (translation catalog embeds the string) and is unrelated.main.16208f0) only applies Black to two pre-existing files required for the repo-wideblack --checkgate; no behaviour change.