Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: scope workspace quotas to organizations#14352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 6 commits intomainfromstevenmasley/org_quotas
Aug 21, 2024

Conversation

Emyrk
Copy link
Member

Quotas are now a function of (user_id, organization_id). They are still sourced from groups. Deprecate the old api endpoint.

Closes#14349

Quotas are now a function of (user_id, organization_id). They arestill sourced from groups. Deprecate the old api endpoint.
@EmyrkEmyrkforce-pushed thestevenmasley/org_quotas branch froma8ff394 to61ed7e1CompareAugust 20, 2024 16:09
@EmyrkEmyrk requested a review fromf0sselAugust 20, 2024 17:16
apiKeyMiddleware,
httpmw.ExtractOrganizationParam(api.Database),
// Intentionally using ExtractUser instead of ExtractMember.
// It is possible for a member to be removed from an org, in which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is fine here, but longer term, is this behavior desirable to administrators? Is there a default dormancy behavior here or any mechanism to clean up these workspaces?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It's desirable because the alternative is to forcibly terminate workspaces when a user is removed. A workspace should remain in case:

  1. Removing the user was an accident
  2. There is data in the workspace that is valuable before termination

I think we do have some dormant workspace behavior today to eventually delete this. Ideally there is some page of "orphaned" workspaces an admin could go through and clean these up.

But this PR does not address any of that. It just makes sure thequota api call still works in this case. Otherwise the/{workspace} page would fail to load because of this failed api call.

// defer to the new endpoint using default org as the organization
chi.RouteContext(r.Context()).URLParams.Add("organization", defaultOrg.ID.String())
mw := httpmw.ExtractOrganizationParam(api.Database)
mw(http.HandlerFunc(api.workspaceQuota)).ServeHTTP(rw, r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

👍

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Man I wish I could just rip this stuff out 😆

@EmyrkEmyrk merged commita359879 intomainAug 21, 2024
28 checks passed
@EmyrkEmyrk deleted the stevenmasley/org_quotas branchAugust 21, 2024 14:25
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 21, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@f0sself0sself0ssel approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Scope quotas to an organization
2 participants
@Emyrk@f0ssel

[8]ページ先頭

©2009-2025 Movatter.jp