directus icon indicating copy to clipboard operation
directus copied to clipboard

Add user limits

Open licitdev opened this issue 1 year ago • 1 comments

Scope

What's changed:

  • Added user limits for Admin, App and API accesses

Potential Risks / Drawbacks

  • Needs further testing for edge cases

Review Notes / Questions

  • WIP tests

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

licitdev avatar May 13 '24 08:05 licitdev

🦋 Changeset detected

Latest commit: cbb4d231d370db0211cbe81aa1e1757f7cd7b59f

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

changeset-bot[bot] avatar May 13 '24 08:05 changeset-bot[bot]

Don't forget additions to the docs config page please.

Edit: Ignore me - they're there.

phazonoverload avatar Jun 03 '24 13:06 phazonoverload

Mhh we dont seem to be checking in updateBatch for the RolesService while we do checks in both updateOne and updateMany - but - the batch update just calls super.updateBatch so I think we can circumvent our checks there? 🤔

But ItemsService.updateBatch calls RolesService.updateOne and ItemService.updateByQuery calls RolesService.updateMany

hanneskuettner avatar Jun 03 '24 18:06 hanneskuettner

But ItemsService.updateBatch calls RolesService.updateOne

But it instantiates a new generic ItemsService in there?

https://github.com/directus/directus/blob/47c438b4e3e2611f16ab372bea66d6396cd13cca/api/src/services/items.ts#L552-L584

Does that still call RolesServices' functions over its own somehow @hanneskuettner ?

DanielBiegler avatar Jun 03 '24 19:06 DanielBiegler

But it instantiates a new generic ItemsService in there?

Ugh you're right. One more level of indirection that I thought about. Good catch... :)

hanneskuettner avatar Jun 03 '24 19:06 hanneskuettner

When testing ms sql too much bites u in the ass 😬 give it another try @paescuj

br41nslug avatar Jun 03 '24 22:06 br41nslug