Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add user limits #22479

Merged
merged 41 commits into from
Jun 4, 2024
Merged

Add user limits #22479

merged 41 commits into from
Jun 4, 2024

Conversation

licitdev
Copy link
Member

@licitdev licitdev commented May 13, 2024

Scope

What's changed:

  • Added user limits for Admin, App and API accesses
  • Limit can be used to restrict public registration

Potential Risks / Drawbacks

  • Needs further testing for edge cases

Review Notes / Questions

  • Todo Unit Tests

Implements the limits mentioned in issue #21981 for Public Registration #22125

Copy link

changeset-bot bot commented May 13, 2024

🦋 Changeset detected

Latest commit: cbb4d23

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@directus/api Minor
@directus/env Patch
@directus/errors Patch
directus Patch
@directus/extensions-registry Patch
@directus/memory Patch
@directus/validation Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@licitdev licitdev marked this pull request as ready for review May 27, 2024 14:52
api/src/services/roles.test.ts Outdated Show resolved Hide resolved
packages/env/src/constants/directus-variables.ts Outdated Show resolved Hide resolved
packages/env/src/constants/directus-variables.ts Outdated Show resolved Hide resolved
api/src/telemetry/utils/get-role-counts-by-roles.ts Outdated Show resolved Hide resolved
api/src/services/users.ts Show resolved Hide resolved
api/src/telemetry/utils/check-increased-user-limits.ts Outdated Show resolved Hide resolved
api/src/telemetry/utils/get-role-counts-by-users.ts Outdated Show resolved Hide resolved
@br41nslug br41nslug requested a review from paescuj May 30, 2024 11:57
@hanneskuettner

This comment was marked as resolved.

@DanielBiegler

This comment was marked as resolved.

@hanneskuettner

This comment was marked as resolved.

api/src/services/roles.ts Outdated Show resolved Hide resolved
api/src/services/roles.ts Outdated Show resolved Hide resolved
api/src/services/roles.ts Outdated Show resolved Hide resolved
api/src/services/roles.ts Show resolved Hide resolved
api/src/services/roles.ts Outdated Show resolved Hide resolved
paescuj
paescuj previously requested changes Jun 3, 2024
api/src/services/roles.ts Outdated Show resolved Hide resolved
@br41nslug

This comment was marked as resolved.

api/src/services/roles.ts Outdated Show resolved Hide resolved
@paescuj paescuj dismissed their stale review June 4, 2024 13:23

Outdated

br41nslug and others added 4 commits June 4, 2024 16:15
* adressing existing users issue

* migrated changes from pascal

* only check the role for active users

* only count active users

* updated incorrect if

* default to count zero

* Undid abstraction to separate function

* fixed updating through user counting error

* prettier

* simplified fallback query

* prettier

* Added try catch to be safee
@br41nslug br41nslug merged commit f5dcd85 into main Jun 4, 2024
5 checks passed
@br41nslug br41nslug deleted the limit-users branch June 4, 2024 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

None yet

7 participants