@lowdefy/api 0.0.0-experimental-20261007090522 → 0.0.0-experimental-20261007124348
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import createAfterAcceptInvitationHook from './createAfterAcceptInvitationHook.js';
|
|
17
17
|
import modelNames from '../modelNames.js';
|
|
18
18
|
import { ac, roles } from './organizationAccessControl.js';
|
|
19
|
+
const DEFAULT_MEMBERSHIP_LIMIT = 1000000;
|
|
19
20
|
// Organizations are always on - the membership and boundary mechanism for every
|
|
20
21
|
// app. member.role carries BetterAuth's org-authority tier and nothing else, so
|
|
21
22
|
// the same three built-in roles - owner, admin, member - are registered under
|
|
@@ -60,6 +61,15 @@ function buildOrganizationPlugin({ authConfig = {}, getAuth, sendInvitationEmail
|
|
|
60
61
|
...Number.isFinite(authConfig.organizations?.invitationExpiresIn) ? {
|
|
61
62
|
invitationExpiresIn: authConfig.organizations.invitationExpiresIn
|
|
62
63
|
} : {},
|
|
64
|
+
// The most members an organization may have. BetterAuth's default of 100
|
|
65
|
+
// is replaced with a cap high enough to be effectively open unless
|
|
66
|
+
// auth.organizations.membershipLimit (build-validated) says otherwise - a
|
|
67
|
+
// pinned deployment keeps every user in one organization, so past 100
|
|
68
|
+
// accept-invitation and addMember refuse with a 403. It stays finite
|
|
69
|
+
// because the plugin also passes it to the adapter as a query limit: the
|
|
70
|
+
// default page size of list-members and the user lookup behind
|
|
71
|
+
// getFullOrganization.
|
|
72
|
+
membershipLimit: Number.isFinite(authConfig.organizations?.membershipLimit) ? authConfig.organizations.membershipLimit : DEFAULT_MEMBERSHIP_LIMIT,
|
|
63
73
|
schema: {
|
|
64
74
|
organization: {
|
|
65
75
|
modelName: modelNames.organization,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/api",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-20261007124348",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
"@better-auth/cimd": "1.7.7",
|
|
38
38
|
"@better-auth/oauth-provider": "1.7.7",
|
|
39
39
|
"@better-auth/passkey": "1.7.7",
|
|
40
|
-
"@lowdefy/ajv": "0.0.0-experimental-
|
|
41
|
-
"@lowdefy/build": "0.0.0-experimental-
|
|
42
|
-
"@lowdefy/connection-smtp": "0.0.0-experimental-
|
|
43
|
-
"@lowdefy/email-templates": "0.0.0-experimental-
|
|
44
|
-
"@lowdefy/errors": "0.0.0-experimental-
|
|
45
|
-
"@lowdefy/helpers": "0.0.0-experimental-
|
|
46
|
-
"@lowdefy/node-utils": "0.0.0-experimental-
|
|
47
|
-
"@lowdefy/nunjucks": "0.0.0-experimental-
|
|
48
|
-
"@lowdefy/operators": "0.0.0-experimental-
|
|
49
|
-
"@lowdefy/operators-js": "0.0.0-experimental-
|
|
40
|
+
"@lowdefy/ajv": "0.0.0-experimental-20261007124348",
|
|
41
|
+
"@lowdefy/build": "0.0.0-experimental-20261007124348",
|
|
42
|
+
"@lowdefy/connection-smtp": "0.0.0-experimental-20261007124348",
|
|
43
|
+
"@lowdefy/email-templates": "0.0.0-experimental-20261007124348",
|
|
44
|
+
"@lowdefy/errors": "0.0.0-experimental-20261007124348",
|
|
45
|
+
"@lowdefy/helpers": "0.0.0-experimental-20261007124348",
|
|
46
|
+
"@lowdefy/node-utils": "0.0.0-experimental-20261007124348",
|
|
47
|
+
"@lowdefy/nunjucks": "0.0.0-experimental-20261007124348",
|
|
48
|
+
"@lowdefy/operators": "0.0.0-experimental-20261007124348",
|
|
49
|
+
"@lowdefy/operators-js": "0.0.0-experimental-20261007124348",
|
|
50
50
|
"@modelcontextprotocol/sdk": "1.31.0",
|
|
51
51
|
"better-auth": "1.7.7",
|
|
52
52
|
"jose": "^6.2.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@jest/globals": "28.1.3",
|
|
58
|
-
"@lowdefy/connection-mongodb": "0.0.0-experimental-
|
|
58
|
+
"@lowdefy/connection-mongodb": "0.0.0-experimental-20261007124348",
|
|
59
59
|
"@opentelemetry/api": "1.9.1",
|
|
60
60
|
"@shelf/jest-mongodb": "4.3.2",
|
|
61
61
|
"@swc/cli": "0.8.1",
|