Skip to content

app/: creating an organization (sc-8900) - #70

Merged
ndbroadbent merged 2 commits into
mainfrom
laravel-orgs
Dec 2, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
laravel-orgs

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Part of sc-8900 (the auth side of the Laravel Rust port). Stacked on #68.

POST /api/ui/orgs with {slug, name} creates an organization, and its creator becomes its admin.

  • Slugs are checked as today: lowercase letters, digits and dashes, and not a reserved word. A taken slug gets 409; today returned 400 for it.
  • Names are 1 to 100 characters.
  • Anyone but staff can create five a day. A new account's own organization, made at sign-up, doesn't count toward the five.

Not in this PR: the setup checklist (/orgs/{org}/setup). One of its steps, "agent connected", reads the OAuth provider's tokens, so it follows once #57 (the OAuth server) is on main. Self-managed GitLab instances follow on that stack too (#55).

Tests: app/tests/orgs.rs. The whole app suite passes on docspring-dev, and clippy is clean.

@visualci-com

visualci-com Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #404 · 333 unchanged · no changes

This PR vs base: 22 changed, 2 added since #239, across 7 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

…lugs checked (reserved words, lowercase letters, digits and dashes) and unique (409), names 1 to 100 characters, five a day except for staff (a new account's own organization doesn't count)
…ns::invite_to, orgs::create_org, tokens::make_project_token and remove_project_token, which the web routes now call too; callers check the person's role
@ndbroadbent
ndbroadbent merged commit 45e4911 into main Dec 2, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the laravel-orgs branch December 2, 2026 22:22
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
… list_organizations, get_organization, create_project, get_project, update_project and download_build; list_builds as one short line per build (sc-8891, part 1); create_project_token, delete_project_token, invite_member and create_organization registered, waiting for #70; the comment anchor's schema text as today's; golden files can be rewritten on purpose (VISUALCI_GOLDEN_UPDATE)
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
…lete_project_token on #70's functions (create_org, invite_to, make_project_token, remove_project_token), with today's role checks and messages; the personal-token test's settings goldens gain comment_when_unchanged
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
… list_organizations, get_organization, create_project, get_project, update_project and download_build; list_builds as one short line per build (sc-8891, part 1); create_project_token, delete_project_token, invite_member and create_organization registered, waiting for #70; the comment anchor's schema text as today's; golden files can be rewritten on purpose (VISUALCI_GOLDEN_UPDATE)
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
…lete_project_token on #70's functions (create_org, invite_to, make_project_token, remove_project_token), with today's role checks and messages; the personal-token test's settings goldens gain comment_when_unchanged
ndbroadbent added a commit that referenced this pull request Dec 2, 2026
* app/: project settings in domain::projects (sc-8900): Settings, SettingsChange, change_settings (a gallery turned off is purged first), create, valid_slug and repository_seen_in_ci, for the MCP tools and subdomains' web UI alike

* app/: the rest of the public MCP server (sc-8900): whoami (with via), list_organizations, get_organization, create_project, get_project, update_project and download_build; list_builds as one short line per build (sc-8891, part 1); create_project_token, delete_project_token, invite_member and create_organization registered, waiting for #70; the comment anchor's schema text as today's; golden files can be rewritten on purpose (VISUALCI_GOLDEN_UPDATE)

* app/: comment_when_unchanged (c2da705, #90) as a project setting: a migration, the model, domain::projects' Settings and SettingsChange, get_project and update_project; its test and golden

* app/: format the comment_when_unchanged migration and test

* app/: create_organization, invite_member, create_project_token and delete_project_token on #70's functions (create_org, invite_to, make_project_token, remove_project_token), with today's role checks and messages; the personal-token test's settings goldens gain comment_when_unchanged

* app/: #91 review fixes: list_builds keeps the whole commit, adds numeric stats and blocked on each line; whoami's via.source in the words reviews record (personal_token, project_token, oauth, web); new MCP tests for invite_member (who may invite, the daily limit), download_build, list_organizations and create_organization's taken slug
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