node-type-registry 0.19.0 → 0.21.0
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.
- package/authz/authz-allow-all.js +10 -10
- package/authz/authz-composite.js +28 -28
- package/authz/authz-deny-all.js +10 -10
- package/authz/authz-direct-owner-any.js +19 -18
- package/authz/authz-direct-owner.js +17 -16
- package/authz/authz-entity-membership.js +44 -38
- package/authz/authz-member-list.js +17 -16
- package/authz/authz-membership-check.js +34 -34
- package/authz/authz-not-read-only.js +23 -22
- package/authz/authz-org-hierarchy.js +33 -31
- package/authz/authz-peer-ownership.js +40 -39
- package/authz/authz-publishable.js +26 -24
- package/authz/authz-related-entity-membership.js +67 -55
- package/authz/authz-related-member-list.js +35 -32
- package/authz/authz-related-peer-ownership.js +63 -59
- package/authz/authz-temporal.js +32 -30
- package/authz/index.d.ts +9 -9
- package/authz/index.js +19 -19
- package/blueprint-types.generated.js +1 -1
- package/codegen/generate-types.js +1 -1
- package/data/data-composite-field.js +27 -25
- package/data/data-direct-owner.js +24 -23
- package/data/data-entity-membership.js +24 -23
- package/data/data-force-current-user.js +17 -16
- package/data/data-id.js +16 -15
- package/data/data-immutable-fields.js +20 -19
- package/data/data-inflection.js +33 -32
- package/data/data-inherit-from-parent.js +31 -29
- package/data/data-job-trigger.js +87 -84
- package/data/data-jsonb.js +27 -26
- package/data/data-owned-fields.js +25 -23
- package/data/data-ownership-in-entity.js +21 -21
- package/data/data-peoplestamps.js +19 -19
- package/data/data-publishable.js +16 -16
- package/data/data-slug.js +21 -19
- package/data/data-soft-delete.js +14 -14
- package/data/data-status-field.js +32 -31
- package/data/data-tags.js +23 -22
- package/data/data-timestamps.js +15 -15
- package/data/index.d.ts +17 -17
- package/data/index.js +35 -35
- package/data/search-bm25.js +34 -33
- package/data/search-full-text.js +49 -47
- package/data/search-spatial-aggregate.js +77 -74
- package/data/search-spatial.js +51 -50
- package/data/search-trgm.js +20 -19
- package/data/search-unified.js +170 -162
- package/data/search-vector.js +104 -101
- package/data/table-organization-settings.js +13 -13
- package/data/table-user-profiles.js +13 -13
- package/data/table-user-settings.js +13 -13
- package/esm/authz/authz-allow-all.js +10 -10
- package/esm/authz/authz-composite.js +28 -28
- package/esm/authz/authz-deny-all.js +10 -10
- package/esm/authz/authz-direct-owner-any.js +19 -18
- package/esm/authz/authz-direct-owner.js +17 -16
- package/esm/authz/authz-entity-membership.js +44 -38
- package/esm/authz/authz-member-list.js +17 -16
- package/esm/authz/authz-membership-check.js +34 -34
- package/esm/authz/authz-not-read-only.js +23 -22
- package/esm/authz/authz-org-hierarchy.js +33 -31
- package/esm/authz/authz-peer-ownership.js +40 -39
- package/esm/authz/authz-publishable.js +26 -24
- package/esm/authz/authz-related-entity-membership.js +67 -55
- package/esm/authz/authz-related-member-list.js +35 -32
- package/esm/authz/authz-related-peer-ownership.js +63 -59
- package/esm/authz/authz-temporal.js +32 -30
- package/esm/authz/index.d.ts +9 -9
- package/esm/authz/index.js +9 -9
- package/esm/blueprint-types.generated.js +1 -1
- package/esm/codegen/generate-types.js +1 -1
- package/esm/data/data-composite-field.js +27 -25
- package/esm/data/data-direct-owner.js +24 -23
- package/esm/data/data-entity-membership.js +24 -23
- package/esm/data/data-force-current-user.js +17 -16
- package/esm/data/data-id.js +16 -15
- package/esm/data/data-immutable-fields.js +20 -19
- package/esm/data/data-inflection.js +33 -32
- package/esm/data/data-inherit-from-parent.js +31 -29
- package/esm/data/data-job-trigger.js +87 -84
- package/esm/data/data-jsonb.js +27 -26
- package/esm/data/data-owned-fields.js +25 -23
- package/esm/data/data-ownership-in-entity.js +21 -21
- package/esm/data/data-peoplestamps.js +19 -19
- package/esm/data/data-publishable.js +16 -16
- package/esm/data/data-slug.js +21 -19
- package/esm/data/data-soft-delete.js +14 -14
- package/esm/data/data-status-field.js +32 -31
- package/esm/data/data-tags.js +23 -22
- package/esm/data/data-timestamps.js +15 -15
- package/esm/data/index.d.ts +17 -17
- package/esm/data/index.js +17 -17
- package/esm/data/search-bm25.js +34 -33
- package/esm/data/search-full-text.js +49 -47
- package/esm/data/search-spatial-aggregate.js +77 -74
- package/esm/data/search-spatial.js +51 -50
- package/esm/data/search-trgm.js +20 -19
- package/esm/data/search-unified.js +170 -162
- package/esm/data/search-vector.js +104 -101
- package/esm/data/table-organization-settings.js +13 -13
- package/esm/data/table-user-profiles.js +13 -13
- package/esm/data/table-user-settings.js +13 -13
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/module-presets/auth-email-magic.js +2 -2
- package/esm/module-presets/auth-email.js +8 -8
- package/esm/module-presets/auth-passkey.js +4 -4
- package/esm/module-presets/auth-sso.js +7 -7
- package/esm/module-presets/full.js +1 -1
- package/esm/module-presets/index.d.ts +5 -5
- package/esm/module-presets/index.js +4 -4
- package/esm/relation/index.d.ts +1 -1
- package/esm/relation/index.js +1 -1
- package/esm/relation/relation-belongs-to.js +41 -40
- package/esm/relation/relation-has-many.js +42 -41
- package/esm/relation/relation-has-one.js +42 -41
- package/esm/relation/relation-many-to-many.js +70 -68
- package/esm/relation/relation-spatial.js +54 -54
- package/esm/view/index.d.ts +3 -3
- package/esm/view/index.js +3 -3
- package/esm/view/view-aggregated.js +50 -48
- package/esm/view/view-composite.js +18 -18
- package/esm/view/view-filtered-table.js +37 -36
- package/esm/view/view-joined-tables.js +65 -61
- package/esm/view/view-table-projection.js +29 -28
- package/index.d.ts +3 -3
- package/index.js +3 -3
- package/module-presets/auth-email-magic.js +2 -2
- package/module-presets/auth-email.js +8 -8
- package/module-presets/auth-passkey.js +4 -4
- package/module-presets/auth-sso.js +7 -7
- package/module-presets/full.js +1 -1
- package/module-presets/index.d.ts +5 -5
- package/module-presets/index.js +7 -7
- package/package.json +2 -2
- package/relation/index.d.ts +1 -1
- package/relation/index.js +3 -3
- package/relation/relation-belongs-to.js +41 -40
- package/relation/relation-has-many.js +42 -41
- package/relation/relation-has-one.js +42 -41
- package/relation/relation-many-to-many.js +70 -68
- package/relation/relation-spatial.js +54 -54
- package/view/index.d.ts +3 -3
- package/view/index.js +7 -7
- package/view/view-aggregated.js +50 -48
- package/view/view-composite.js +18 -18
- package/view/view-filtered-table.js +37 -36
- package/view/view-joined-tables.js +65 -61
- package/view/view-table-projection.js +29 -28
|
@@ -2,56 +2,57 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzPeerOwnership = void 0;
|
|
4
4
|
exports.AuthzPeerOwnership = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'AuthzPeerOwnership',
|
|
6
|
+
slug: 'authz_peer_ownership',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Peer Ownership',
|
|
9
|
+
description: 'Peer visibility through shared entity membership. Authorizes access to user-owned rows when the owner and current user are both members of the same entity. Self-joins the SPRT table to find peers.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
owner_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Column name on protected table referencing the owning user (e.g., owner_id)'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
membership_type: {
|
|
19
|
+
type: [
|
|
20
|
+
'integer',
|
|
21
|
+
'string'
|
|
21
22
|
],
|
|
22
|
-
|
|
23
|
+
description: 'Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)'
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
entity_type: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
|
|
27
28
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
permission: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'Single permission name to check on the current user membership (resolved to bitstring mask)'
|
|
31
32
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
permissions: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'string'
|
|
36
37
|
},
|
|
37
|
-
|
|
38
|
+
description: 'Multiple permission names to check on the current user membership (ORed together into mask)'
|
|
38
39
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
is_admin: {
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'If true, require is_admin flag on current user membership'
|
|
42
43
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
is_owner: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
description: 'If true, require is_owner flag on current user membership'
|
|
46
47
|
}
|
|
47
48
|
},
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
required: [
|
|
50
|
+
'owner_field'
|
|
50
51
|
]
|
|
51
52
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
tags: [
|
|
54
|
+
'membership',
|
|
55
|
+
'peer',
|
|
56
|
+
'authz'
|
|
56
57
|
]
|
|
57
58
|
};
|
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzPublishable = void 0;
|
|
4
4
|
exports.AuthzPublishable = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
name: 'AuthzPublishable',
|
|
6
|
+
slug: 'authz_publishable',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Published Content',
|
|
9
|
+
description: 'Published state access control. Restricts access to records that are published.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
is_published_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Boolean field indicating published state',
|
|
17
|
+
default: 'is_published'
|
|
17
18
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
published_at_field: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
format: 'column-ref',
|
|
22
|
+
description: 'Timestamp field for publish time',
|
|
23
|
+
default: 'published_at'
|
|
22
24
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
require_published_at: {
|
|
26
|
+
type: 'boolean',
|
|
27
|
+
description: 'Require published_at to be non-null and <= now()',
|
|
28
|
+
default: true
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
tags: [
|
|
33
|
+
'temporal',
|
|
34
|
+
'publishing',
|
|
35
|
+
'authz'
|
|
34
36
|
]
|
|
35
37
|
};
|
|
@@ -2,77 +2,89 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzRelatedEntityMembership = void 0;
|
|
4
4
|
exports.AuthzRelatedEntityMembership = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'AuthzRelatedEntityMembership',
|
|
6
|
+
slug: 'authz_related_entity_membership',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Related Entity Membership',
|
|
9
|
+
description: 'JOIN-based membership verification through related tables. Joins SPRT table with another table to verify membership.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
entity_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Column name on protected table referencing the join table'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
sel_field: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'SPRT column to select for the entity match',
|
|
21
|
+
default: 'entity_id'
|
|
22
|
+
},
|
|
23
|
+
sprt_join_field: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
description: 'SPRT column to join on with the related table',
|
|
26
|
+
default: 'entity_id'
|
|
27
|
+
},
|
|
28
|
+
membership_type: {
|
|
29
|
+
type: [
|
|
30
|
+
'integer',
|
|
31
|
+
'string'
|
|
21
32
|
],
|
|
22
|
-
|
|
33
|
+
description: 'Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)'
|
|
23
34
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
entity_type: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
|
|
27
38
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
obj_table_id: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
format: 'uuid',
|
|
42
|
+
description: 'UUID of the join table (alternative to obj_schema/obj_table)'
|
|
32
43
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
44
|
+
obj_schema: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Schema of the join table (or use obj_table_id)'
|
|
36
47
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
obj_table: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Name of the join table (or use obj_table_id)'
|
|
40
51
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
obj_field_id: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
format: 'uuid',
|
|
55
|
+
description: 'UUID of field on join table (alternative to obj_field)'
|
|
45
56
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
57
|
+
obj_field: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
format: 'column-ref',
|
|
60
|
+
description: 'Field name on join table to match against SPRT entity_id'
|
|
49
61
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
permission: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Single permission name to check (resolved to bitstring mask)'
|
|
53
65
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
66
|
+
permissions: {
|
|
67
|
+
type: 'array',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'string'
|
|
58
70
|
},
|
|
59
|
-
|
|
71
|
+
description: 'Multiple permission names to check (ORed together into mask)'
|
|
60
72
|
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
is_admin: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'If true, require is_admin flag'
|
|
64
76
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
is_owner: {
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
description: 'If true, require is_owner flag'
|
|
68
80
|
}
|
|
69
81
|
},
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
required: [
|
|
83
|
+
'entity_field'
|
|
72
84
|
]
|
|
73
85
|
},
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
86
|
+
tags: [
|
|
87
|
+
'membership',
|
|
88
|
+
'authz'
|
|
77
89
|
]
|
|
78
90
|
};
|
|
@@ -2,45 +2,48 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzRelatedMemberList = void 0;
|
|
4
4
|
exports.AuthzRelatedMemberList = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'AuthzRelatedMemberList',
|
|
6
|
+
slug: 'authz_related_member_list',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Related Member List',
|
|
9
|
+
description: 'Array membership check in a related table.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
owned_schema: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
description: 'Schema of the related table'
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
owned_table: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
description: 'Name of the related table'
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
owned_table_key: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
format: 'column-ref',
|
|
24
|
+
description: 'Array column in related table'
|
|
24
25
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
owned_table_ref_key: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
format: 'column-ref',
|
|
29
|
+
description: 'FK column in related table'
|
|
28
30
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
this_object_key: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
format: 'column-ref',
|
|
34
|
+
description: 'PK column in protected table'
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
required: [
|
|
38
|
+
'owned_schema',
|
|
39
|
+
'owned_table',
|
|
40
|
+
'owned_table_key',
|
|
41
|
+
'owned_table_ref_key',
|
|
42
|
+
'this_object_key'
|
|
40
43
|
]
|
|
41
44
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
tags: [
|
|
46
|
+
'ownership',
|
|
47
|
+
'authz'
|
|
45
48
|
]
|
|
46
49
|
};
|
|
@@ -2,82 +2,86 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzRelatedPeerOwnership = void 0;
|
|
4
4
|
exports.AuthzRelatedPeerOwnership = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'AuthzRelatedPeerOwnership',
|
|
6
|
+
slug: 'authz_related_peer_ownership',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Related Peer Ownership',
|
|
9
|
+
description: 'Peer visibility through shared entity membership via a related table. Like AuthzPeerOwnership but the owning user is resolved through a FK JOIN to a related table. Combines SPRT self-join with object table JOIN.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
entity_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Column name on protected table referencing the related table (e.g., message_id)'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
membership_type: {
|
|
19
|
+
type: [
|
|
20
|
+
'integer',
|
|
21
|
+
'string'
|
|
21
22
|
],
|
|
22
|
-
|
|
23
|
+
description: 'Scope: 1=app, 2=org, 3+=dynamic entity types (or string name resolved via membership_types_module)'
|
|
23
24
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
entity_type: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: "Entity type prefix (e.g. 'channel', 'department'). Resolved to membership_type integer via memberships_module lookup. Use instead of membership_type for readability."
|
|
27
28
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
obj_table_id: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
format: 'uuid',
|
|
32
|
+
description: 'UUID of the related table (alternative to obj_schema/obj_table)'
|
|
32
33
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
obj_schema: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Schema of the related table (or use obj_table_id)'
|
|
36
37
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
obj_table: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Name of the related table (or use obj_table_id)'
|
|
40
41
|
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
obj_field_id: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
format: 'uuid',
|
|
45
|
+
description: 'UUID of field on related table containing the owner user ID (alternative to obj_field)'
|
|
45
46
|
},
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
obj_field: {
|
|
48
|
+
type: 'string',
|
|
49
|
+
format: 'column-ref',
|
|
50
|
+
description: 'Field name on related table containing the owner user ID (e.g., sender_id)'
|
|
49
51
|
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
obj_ref_field: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
format: 'column-ref',
|
|
55
|
+
description: 'Field on related table to select for matching entity_field',
|
|
56
|
+
default: 'id'
|
|
53
57
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
permission: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Single permission name to check on the current user membership (resolved to bitstring mask)'
|
|
57
61
|
},
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
permissions: {
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'string'
|
|
62
66
|
},
|
|
63
|
-
|
|
67
|
+
description: 'Multiple permission names to check on the current user membership (ORed together into mask)'
|
|
64
68
|
},
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
is_admin: {
|
|
70
|
+
type: 'boolean',
|
|
71
|
+
description: 'If true, require is_admin flag on current user membership'
|
|
68
72
|
},
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
is_owner: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'If true, require is_owner flag on current user membership'
|
|
72
76
|
}
|
|
73
77
|
},
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
required: [
|
|
79
|
+
'entity_field'
|
|
76
80
|
]
|
|
77
81
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
+
tags: [
|
|
83
|
+
'membership',
|
|
84
|
+
'peer',
|
|
85
|
+
'authz'
|
|
82
86
|
]
|
|
83
87
|
};
|
package/authz/authz-temporal.js
CHANGED
|
@@ -2,48 +2,50 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AuthzTemporal = void 0;
|
|
4
4
|
exports.AuthzTemporal = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
name: 'AuthzTemporal',
|
|
6
|
+
slug: 'authz_temporal',
|
|
7
|
+
category: 'authz',
|
|
8
|
+
display_name: 'Temporal Access',
|
|
9
|
+
description: 'Time-window based access control. Restricts access based on valid_from and/or valid_until timestamps. At least one of valid_from_field or valid_until_field must be provided.',
|
|
10
|
+
parameter_schema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
valid_from_field: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
format: 'column-ref',
|
|
16
|
+
description: 'Column for start time (at least one of valid_from_field or valid_until_field required)'
|
|
16
17
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
valid_until_field: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
format: 'column-ref',
|
|
21
|
+
description: 'Column for end time (at least one of valid_from_field or valid_until_field required)'
|
|
20
22
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
valid_from_inclusive: {
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
description: 'Include start boundary',
|
|
26
|
+
default: true
|
|
25
27
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
valid_until_inclusive: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
description: 'Include end boundary',
|
|
31
|
+
default: false
|
|
30
32
|
}
|
|
31
33
|
},
|
|
32
|
-
|
|
34
|
+
anyOf: [
|
|
33
35
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
required: [
|
|
37
|
+
'valid_from_field'
|
|
36
38
|
]
|
|
37
39
|
},
|
|
38
40
|
{
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
required: [
|
|
42
|
+
'valid_until_field'
|
|
41
43
|
]
|
|
42
44
|
}
|
|
43
45
|
]
|
|
44
46
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
tags: [
|
|
48
|
+
'temporal',
|
|
49
|
+
'authz'
|
|
48
50
|
]
|
|
49
51
|
};
|