Skip to content

Quota limits - #2115

Open
bfoley12 wants to merge 12 commits into
devfrom
quota-limits
Open

Quota limits#2115
bfoley12 wants to merge 12 commits into
devfrom
quota-limits

Conversation

@bfoley12

Copy link
Copy Markdown
Collaborator

Summary

Added limits to what users are able to contribute:

  1. Max number of projects per user (default 3)
  2. Max number of contributions on an unapproved projects (500)
  3. Max number of columns on a project (160)

Comment on lines +12 to +27
from mpcontribs_api.exceptions import ValidationError


def _validate_column_limit(columns: Any) -> Any:
"""Reject input carrying more than the configured column cap.

Allows legacy docs that exceed cap to be returned without raising an error.
"""
if isinstance(columns, list):
max_columns = get_settings().user.max_columns
if len(columns) > max_columns:
raise ValidationError(
f"columns cannot have more than {max_columns} entries",
column_length=len(columns),
)
return columns

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There is another branch I'm finishing that changes how columns work (right now they are defined by a project at upload time, but we correct that to be derived from the Project's Contributions.data keys)

@bfoley12
bfoley12 marked this pull request as ready for review July 27, 2026 18:59
@bfoley12
bfoley12 requested a review from tsmathis July 27, 2026 18:59
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