meli icon indicating copy to clipboard operation
meli copied to clipboard

Handling of MAX_ORGS is not right

Open mtiller opened this issue 2 years ago • 3 comments

It seems that if you provide any other value besides 1 for MELI_MAX_ORGS, then the limit is not enforced. I scanned the code and couldn't find an obvious source for the bug. My experience is that if you configure a server with the MELI_MAX_ORGS value set to 5, for example, you can create as many orgs as you want, you'll never get an error.

mtiller avatar Feb 03 '22 14:02 mtiller

That's strange, the maxOrgsGuard is correctly placed in the createOrg handler.

gempain avatar Feb 04 '22 15:02 gempain

It isn't that the guard isn't working. For the default value, it definitely prevents organizations from being created. But when I set it to 10, I was then able to make more than 10 orgs. Then if I set it to 5 (with 10+ orgs already existing) and it still allowed me to create more.

mtiller avatar Feb 04 '22 18:02 mtiller

Oh wow okay that is really weird. I'll have a look this weekend because this is an issue. Thanks so much for reporting!

gempain avatar Feb 04 '22 20:02 gempain