@venizia/ignis 0.0.9-2 → 0.0.9-21
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/README.md +2 -2
- package/dist/base/metadata/persistents.d.ts.map +1 -1
- package/dist/base/metadata/persistents.js +6 -0
- package/dist/base/metadata/persistents.js.map +1 -1
- package/dist/base/middlewares/app-error/app-error.middleware.d.ts +15 -0
- package/dist/base/middlewares/app-error/app-error.middleware.d.ts.map +1 -0
- package/dist/base/middlewares/app-error/app-error.middleware.js +81 -0
- package/dist/base/middlewares/app-error/app-error.middleware.js.map +1 -0
- package/dist/base/middlewares/app-error/database.handler.d.ts +20 -0
- package/dist/base/middlewares/app-error/database.handler.d.ts.map +1 -0
- package/dist/base/middlewares/app-error/database.handler.js +55 -0
- package/dist/base/middlewares/app-error/database.handler.js.map +1 -0
- package/dist/base/middlewares/app-error/definition.d.ts +59 -0
- package/dist/base/middlewares/app-error/definition.d.ts.map +1 -0
- package/dist/base/middlewares/app-error/definition.js +98 -0
- package/dist/base/middlewares/app-error/definition.js.map +1 -0
- package/dist/base/middlewares/app-error/index.d.ts +2 -0
- package/dist/base/middlewares/app-error/index.d.ts.map +1 -0
- package/dist/{components/auth/authorize/models/abilities → base/middlewares/app-error}/index.js +1 -2
- package/dist/base/middlewares/app-error/index.js.map +1 -0
- package/dist/base/middlewares/app-error/types.d.ts +18 -0
- package/dist/base/middlewares/app-error/types.d.ts.map +1 -0
- package/dist/base/middlewares/app-error/types.js +3 -0
- package/dist/base/middlewares/app-error/types.js.map +1 -0
- package/dist/base/middlewares/app-error/zod.handler.d.ts +28 -0
- package/dist/base/middlewares/app-error/zod.handler.d.ts.map +1 -0
- package/dist/base/middlewares/app-error/zod.handler.js +64 -0
- package/dist/base/middlewares/app-error/zod.handler.js.map +1 -0
- package/dist/base/middlewares/emoji-favicon/emoji-favicon.middleware.d.ts.map +1 -0
- package/dist/base/middlewares/emoji-favicon/emoji-favicon.middleware.js.map +1 -0
- package/dist/base/middlewares/emoji-favicon/index.d.ts +2 -0
- package/dist/base/middlewares/emoji-favicon/index.d.ts.map +1 -0
- package/dist/base/middlewares/emoji-favicon/index.js +18 -0
- package/dist/base/middlewares/emoji-favicon/index.js.map +1 -0
- package/dist/base/middlewares/index.d.ts +4 -4
- package/dist/base/middlewares/index.d.ts.map +1 -1
- package/dist/base/middlewares/index.js +4 -4
- package/dist/base/middlewares/index.js.map +1 -1
- package/dist/base/middlewares/not-found/index.d.ts +2 -0
- package/dist/base/middlewares/not-found/index.d.ts.map +1 -0
- package/dist/base/middlewares/not-found/index.js +18 -0
- package/dist/base/middlewares/not-found/index.js.map +1 -0
- package/dist/base/middlewares/{not-found.middleware.d.ts → not-found/not-found.middleware.d.ts} +0 -1
- package/dist/base/middlewares/not-found/not-found.middleware.d.ts.map +1 -0
- package/dist/base/middlewares/{not-found.middleware.js → not-found/not-found.middleware.js} +2 -3
- package/dist/base/middlewares/{not-found.middleware.js.map → not-found/not-found.middleware.js.map} +1 -1
- package/dist/base/middlewares/request-spy/index.d.ts +2 -0
- package/dist/base/middlewares/request-spy/index.d.ts.map +1 -0
- package/dist/base/middlewares/request-spy/index.js +18 -0
- package/dist/base/middlewares/request-spy/index.js.map +1 -0
- package/dist/base/middlewares/{request-spy.middleware.d.ts → request-spy/request-spy.middleware.d.ts} +1 -1
- package/dist/base/middlewares/request-spy/request-spy.middleware.d.ts.map +1 -0
- package/dist/base/middlewares/{request-spy.middleware.js → request-spy/request-spy.middleware.js} +1 -1
- package/dist/base/middlewares/request-spy/request-spy.middleware.js.map +1 -0
- package/dist/base/models/common/columns.d.ts +22 -0
- package/dist/base/models/common/columns.d.ts.map +1 -0
- package/dist/base/models/common/columns.js +43 -0
- package/dist/base/models/common/columns.js.map +1 -0
- package/dist/base/models/common/index.d.ts +1 -0
- package/dist/base/models/common/index.d.ts.map +1 -1
- package/dist/base/models/common/index.js +1 -0
- package/dist/base/models/common/index.js.map +1 -1
- package/dist/base/models/enrichers/principal.enricher.d.ts +6 -5
- package/dist/base/models/enrichers/principal.enricher.d.ts.map +1 -1
- package/dist/base/models/enrichers/principal.enricher.js +8 -3
- package/dist/base/models/enrichers/principal.enricher.js.map +1 -1
- package/dist/base/models/enrichers/tz.enricher.d.ts +9 -8
- package/dist/base/models/enrichers/tz.enricher.d.ts.map +1 -1
- package/dist/base/models/enrichers/tz.enricher.js +10 -10
- package/dist/base/models/enrichers/tz.enricher.js.map +1 -1
- package/dist/base/repositories/common/types.d.ts +6 -2
- package/dist/base/repositories/common/types.d.ts.map +1 -1
- package/dist/base/repositories/common/types.js +6 -4
- package/dist/base/repositories/common/types.js.map +1 -1
- package/dist/base/repositories/core/abstract.d.ts +2 -0
- package/dist/base/repositories/core/abstract.d.ts.map +1 -1
- package/dist/base/repositories/core/persistable.d.ts +6 -1
- package/dist/base/repositories/core/persistable.d.ts.map +1 -1
- package/dist/base/repositories/core/persistable.js +18 -6
- package/dist/base/repositories/core/persistable.js.map +1 -1
- package/dist/base/repositories/core/readable.d.ts.map +1 -1
- package/dist/base/repositories/core/readable.js +21 -5
- package/dist/base/repositories/core/readable.js.map +1 -1
- package/dist/base/repositories/core/soft-deletable.d.ts +1 -1
- package/dist/base/repositories/core/soft-deletable.d.ts.map +1 -1
- package/dist/base/repositories/mixins/default-filter.d.ts +3 -0
- package/dist/base/repositories/mixins/default-filter.d.ts.map +1 -1
- package/dist/base/repositories/mixins/default-filter.js +11 -0
- package/dist/base/repositories/mixins/default-filter.js.map +1 -1
- package/dist/base/repositories/operators/filter.d.ts +4 -0
- package/dist/base/repositories/operators/filter.d.ts.map +1 -1
- package/dist/base/repositories/operators/filter.js +23 -2
- package/dist/base/repositories/operators/filter.js.map +1 -1
- package/dist/components/auth/authorize/adapters/base-filtered.d.ts +26 -56
- package/dist/components/auth/authorize/adapters/base-filtered.d.ts.map +1 -1
- package/dist/components/auth/authorize/adapters/base-filtered.js +23 -70
- package/dist/components/auth/authorize/adapters/base-filtered.js.map +1 -1
- package/dist/components/auth/authorize/adapters/index.d.ts +2 -1
- package/dist/components/auth/authorize/adapters/index.d.ts.map +1 -1
- package/dist/components/auth/authorize/adapters/index.js +2 -1
- package/dist/components/auth/authorize/adapters/index.js.map +1 -1
- package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.d.ts +138 -0
- package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.d.ts.map +1 -0
- package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.js +300 -0
- package/dist/components/auth/authorize/adapters/scoped-casbin.adapter.js.map +1 -0
- package/dist/components/auth/authorize/adapters/types.d.ts +31 -0
- package/dist/components/auth/authorize/adapters/types.d.ts.map +1 -0
- package/dist/components/auth/authorize/adapters/types.js +3 -0
- package/dist/components/auth/authorize/adapters/types.js.map +1 -0
- package/dist/components/auth/authorize/common/constants.d.ts +144 -8
- package/dist/components/auth/authorize/common/constants.d.ts.map +1 -1
- package/dist/components/auth/authorize/common/constants.js +171 -13
- package/dist/components/auth/authorize/common/constants.js.map +1 -1
- package/dist/components/auth/authorize/common/index.d.ts +4 -0
- package/dist/components/auth/authorize/common/index.d.ts.map +1 -1
- package/dist/components/auth/authorize/common/index.js +4 -0
- package/dist/components/auth/authorize/common/index.js.map +1 -1
- package/dist/components/auth/authorize/common/object-match.d.ts +21 -0
- package/dist/components/auth/authorize/common/object-match.d.ts.map +1 -0
- package/dist/components/auth/authorize/common/object-match.js +33 -0
- package/dist/components/auth/authorize/common/object-match.js.map +1 -0
- package/dist/components/auth/authorize/common/permission-builder.d.ts +92 -0
- package/dist/components/auth/authorize/common/permission-builder.d.ts.map +1 -0
- package/dist/components/auth/authorize/common/permission-builder.js +99 -0
- package/dist/components/auth/authorize/common/permission-builder.js.map +1 -0
- package/dist/components/auth/authorize/common/policy-builder.d.ts +183 -0
- package/dist/components/auth/authorize/common/policy-builder.d.ts.map +1 -0
- package/dist/components/auth/authorize/common/policy-builder.js +130 -0
- package/dist/components/auth/authorize/common/policy-builder.js.map +1 -0
- package/dist/components/auth/authorize/common/resolve-request-domain.d.ts +20 -0
- package/dist/components/auth/authorize/common/resolve-request-domain.d.ts.map +1 -0
- package/dist/components/auth/authorize/common/resolve-request-domain.js +59 -0
- package/dist/components/auth/authorize/common/resolve-request-domain.js.map +1 -0
- package/dist/components/auth/authorize/common/types.d.ts +70 -23
- package/dist/components/auth/authorize/common/types.d.ts.map +1 -1
- package/dist/components/auth/authorize/enforcers/casbin.enforcer.d.ts +120 -28
- package/dist/components/auth/authorize/enforcers/casbin.enforcer.d.ts.map +1 -1
- package/dist/components/auth/authorize/enforcers/casbin.enforcer.js +324 -124
- package/dist/components/auth/authorize/enforcers/casbin.enforcer.js.map +1 -1
- package/dist/components/auth/authorize/enforcers/enforcer-registry.d.ts +19 -1
- package/dist/components/auth/authorize/enforcers/enforcer-registry.d.ts.map +1 -1
- package/dist/components/auth/authorize/enforcers/enforcer-registry.js +23 -0
- package/dist/components/auth/authorize/enforcers/enforcer-registry.js.map +1 -1
- package/dist/components/auth/authorize/enforcers/index.d.ts +1 -0
- package/dist/components/auth/authorize/enforcers/index.d.ts.map +1 -1
- package/dist/components/auth/authorize/enforcers/index.js +1 -0
- package/dist/components/auth/authorize/enforcers/index.js.map +1 -1
- package/dist/components/auth/authorize/enforcers/models/index.d.ts +2 -0
- package/dist/components/auth/authorize/enforcers/models/index.d.ts.map +1 -0
- package/dist/components/auth/authorize/enforcers/models/index.js +18 -0
- package/dist/components/auth/authorize/enforcers/models/index.js.map +1 -0
- package/dist/components/auth/authorize/enforcers/models/rbac-domain.model.d.ts +32 -0
- package/dist/components/auth/authorize/enforcers/models/rbac-domain.model.d.ts.map +1 -0
- package/dist/components/auth/authorize/enforcers/models/rbac-domain.model.js +54 -0
- package/dist/components/auth/authorize/enforcers/models/rbac-domain.model.js.map +1 -0
- package/dist/components/auth/authorize/models/index.d.ts +0 -1
- package/dist/components/auth/authorize/models/index.d.ts.map +1 -1
- package/dist/components/auth/authorize/models/index.js +0 -1
- package/dist/components/auth/authorize/models/index.js.map +1 -1
- package/dist/components/auth/authorize/providers/authorization.provider.d.ts.map +1 -1
- package/dist/components/auth/authorize/providers/authorization.provider.js +12 -0
- package/dist/components/auth/authorize/providers/authorization.provider.js.map +1 -1
- package/dist/components/auth/models/entities/permission.model.d.ts +2 -0
- package/dist/components/auth/models/entities/permission.model.d.ts.map +1 -1
- package/dist/components/auth/models/entities/permission.model.js +4 -0
- package/dist/components/auth/models/entities/permission.model.js.map +1 -1
- package/dist/components/auth/models/entities/user.model.d.ts +16 -2
- package/dist/components/auth/models/entities/user.model.d.ts.map +1 -1
- package/dist/components/auth/models/entities/user.model.js +3 -2
- package/dist/components/auth/models/entities/user.model.js.map +1 -1
- package/dist/components/mail/helpers/executors/internal-queue-executor.helper.d.ts.map +1 -1
- package/dist/components/mail/helpers/executors/internal-queue-executor.helper.js +1 -1
- package/dist/components/mail/helpers/executors/internal-queue-executor.helper.js.map +1 -1
- package/dist/components/static-asset/models/base.model.d.ts +24 -16
- package/dist/components/static-asset/models/base.model.d.ts.map +1 -1
- package/dist/helpers/inversion/common/types.d.ts +2 -0
- package/dist/helpers/inversion/common/types.d.ts.map +1 -1
- package/package.json +28 -27
- package/dist/base/middlewares/app-error.middleware.d.ts +0 -8
- package/dist/base/middlewares/app-error.middleware.d.ts.map +0 -1
- package/dist/base/middlewares/app-error.middleware.js +0 -138
- package/dist/base/middlewares/app-error.middleware.js.map +0 -1
- package/dist/base/middlewares/emoji-favicon.middleware.d.ts.map +0 -1
- package/dist/base/middlewares/emoji-favicon.middleware.js.map +0 -1
- package/dist/base/middlewares/not-found.middleware.d.ts.map +0 -1
- package/dist/base/middlewares/request-spy.middleware.d.ts.map +0 -1
- package/dist/base/middlewares/request-spy.middleware.js.map +0 -1
- package/dist/components/auth/authorize/adapters/drizzle-casbin.d.ts +0 -40
- package/dist/components/auth/authorize/adapters/drizzle-casbin.d.ts.map +0 -1
- package/dist/components/auth/authorize/adapters/drizzle-casbin.js +0 -99
- package/dist/components/auth/authorize/adapters/drizzle-casbin.js.map +0 -1
- package/dist/components/auth/authorize/models/abilities/index.d.ts +0 -3
- package/dist/components/auth/authorize/models/abilities/index.d.ts.map +0 -1
- package/dist/components/auth/authorize/models/abilities/index.js.map +0 -1
- package/dist/components/auth/authorize/models/abilities/string-action.model.d.ts +0 -14
- package/dist/components/auth/authorize/models/abilities/string-action.model.d.ts.map +0 -1
- package/dist/components/auth/authorize/models/abilities/string-action.model.js +0 -23
- package/dist/components/auth/authorize/models/abilities/string-action.model.js.map +0 -1
- package/dist/components/auth/authorize/models/abilities/string-resource.model.d.ts +0 -13
- package/dist/components/auth/authorize/models/abilities/string-resource.model.d.ts.map +0 -1
- package/dist/components/auth/authorize/models/abilities/string-resource.model.js +0 -19
- package/dist/components/auth/authorize/models/abilities/string-resource.model.js.map +0 -1
- /package/dist/base/middlewares/{emoji-favicon.middleware.d.ts → emoji-favicon/emoji-favicon.middleware.d.ts} +0 -0
- /package/dist/base/middlewares/{emoji-favicon.middleware.js → emoji-favicon/emoji-favicon.middleware.js} +0 -0
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CasbinRuleVariants = exports.CasbinEnforcerModelDrivers = exports.CasbinEnforcerCachedDrivers = exports.AuthorizationEnforcerTypes = exports.AuthorizationRoles = exports.AuthorizationDecisions = exports.AuthorizationActions = exports.Authorization = void 0;
|
|
3
|
+
exports.AuthorizationPolicyVariants = exports.CasbinRuleVariants = exports.AuthorizationDomainScopes = exports.CasbinDomainMatchingFunctions = exports.CasbinEnforcerModelDrivers = exports.CasbinEnforcerCachedDrivers = exports.AuthorizationEnforcerTypes = exports.AuthorizationRoles = exports.AuthorizationDecisions = exports.AuthorizationActions = exports.Authorization = void 0;
|
|
4
4
|
const authorization_role_model_1 = require("../models/authorization-role.model");
|
|
5
5
|
class Authorization {
|
|
6
6
|
static { this.RULES = 'authorization.rules'; }
|
|
7
7
|
static { this.SKIP_AUTHORIZATION = 'authorization.skip'; }
|
|
8
8
|
static { this.ENFORCER = 'authorization.enforcer'; }
|
|
9
|
+
static { this.DOMAIN = 'authorization.domain'; }
|
|
9
10
|
}
|
|
10
11
|
exports.Authorization = Authorization;
|
|
11
12
|
class AuthorizationActions {
|
|
12
13
|
static { this.CREATE = 'create'; }
|
|
13
|
-
static { this.READ = 'read'; }
|
|
14
14
|
static { this.UPDATE = 'update'; }
|
|
15
15
|
static { this.DELETE = 'delete'; }
|
|
16
16
|
static { this.EXECUTE = 'execute'; }
|
|
17
|
+
static { this.READ = 'read'; }
|
|
18
|
+
static { this.WRITE = 'write'; }
|
|
19
|
+
static { this.MANAGE = 'manage'; }
|
|
17
20
|
static { this.SCHEME_SET = new Set([
|
|
18
21
|
this.CREATE,
|
|
19
|
-
this.READ,
|
|
20
22
|
this.UPDATE,
|
|
21
23
|
this.DELETE,
|
|
22
24
|
this.EXECUTE,
|
|
25
|
+
this.READ,
|
|
26
|
+
this.WRITE,
|
|
27
|
+
this.MANAGE,
|
|
23
28
|
]); }
|
|
29
|
+
static { this.LATTICE = [
|
|
30
|
+
{ child: this.READ, parent: this.MANAGE },
|
|
31
|
+
{ child: this.WRITE, parent: this.MANAGE },
|
|
32
|
+
{ child: this.EXECUTE, parent: this.MANAGE },
|
|
33
|
+
{ child: this.CREATE, parent: this.WRITE },
|
|
34
|
+
{ child: this.UPDATE, parent: this.WRITE },
|
|
35
|
+
{ child: this.DELETE, parent: this.WRITE },
|
|
36
|
+
]; }
|
|
24
37
|
static isValid(input) {
|
|
25
38
|
return this.SCHEME_SET.has(input);
|
|
26
39
|
}
|
|
@@ -97,9 +110,8 @@ class AuthorizationEnforcerTypes {
|
|
|
97
110
|
}
|
|
98
111
|
exports.AuthorizationEnforcerTypes = AuthorizationEnforcerTypes;
|
|
99
112
|
class CasbinEnforcerCachedDrivers {
|
|
100
|
-
static { this.IN_MEMORY = 'in-memory'; }
|
|
101
113
|
static { this.REDIS = 'redis'; }
|
|
102
|
-
static { this.SCHEME_SET = new Set([this.
|
|
114
|
+
static { this.SCHEME_SET = new Set([this.REDIS]); }
|
|
103
115
|
static isValid(input) {
|
|
104
116
|
return this.SCHEME_SET.has(input);
|
|
105
117
|
}
|
|
@@ -114,17 +126,163 @@ class CasbinEnforcerModelDrivers {
|
|
|
114
126
|
}
|
|
115
127
|
}
|
|
116
128
|
exports.CasbinEnforcerModelDrivers = CasbinEnforcerModelDrivers;
|
|
117
|
-
class
|
|
118
|
-
|
|
119
|
-
static { this.
|
|
120
|
-
/**
|
|
121
|
-
static { this.
|
|
122
|
-
/**
|
|
123
|
-
static { this.
|
|
124
|
-
|
|
129
|
+
class CasbinDomainMatchingFunctions {
|
|
130
|
+
/** `*` is the only wildcard; exact compare otherwise. Safest for `Merchant_<uuid>` domains. */
|
|
131
|
+
static { this.KEY_MATCH = 'keyMatch'; }
|
|
132
|
+
/** Adds URL-path `:param` segment matching. */
|
|
133
|
+
static { this.KEY_MATCH_2 = 'keyMatch2'; }
|
|
134
|
+
/** Adds `{param}` segment matching. */
|
|
135
|
+
static { this.KEY_MATCH_3 = 'keyMatch3'; }
|
|
136
|
+
/** `{param}` matching with repeated-name equality checks. */
|
|
137
|
+
static { this.KEY_MATCH_4 = 'keyMatch4'; }
|
|
138
|
+
/** Treats the stored/policy value as a full regular expression. */
|
|
139
|
+
static { this.REGEX_MATCH = 'regexMatch'; }
|
|
140
|
+
static { this.SCHEME_SET = new Set([
|
|
141
|
+
this.KEY_MATCH,
|
|
142
|
+
this.KEY_MATCH_2,
|
|
143
|
+
this.KEY_MATCH_3,
|
|
144
|
+
this.KEY_MATCH_4,
|
|
145
|
+
this.REGEX_MATCH,
|
|
146
|
+
]); }
|
|
147
|
+
static isValid(input) {
|
|
148
|
+
return this.SCHEME_SET.has(input);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.CasbinDomainMatchingFunctions = CasbinDomainMatchingFunctions;
|
|
152
|
+
class AuthorizationDomainScopes {
|
|
153
|
+
/** Grant applies in EVERY domain the subject is a member of (checked via join_domain / g2). */
|
|
154
|
+
static { this.ANY_MEMBER = 'ANY_MEMBER'; }
|
|
155
|
+
/** Grant applies system-wide, bypassing membership — super-admin only. */
|
|
156
|
+
static { this.SYSTEM_WIDE = 'SYSTEM_WIDE'; }
|
|
157
|
+
static { this.SCHEME_SET = new Set([this.ANY_MEMBER, this.SYSTEM_WIDE]); }
|
|
125
158
|
static isValid(input) {
|
|
126
159
|
return this.SCHEME_SET.has(input);
|
|
127
160
|
}
|
|
128
161
|
}
|
|
162
|
+
exports.AuthorizationDomainScopes = AuthorizationDomainScopes;
|
|
163
|
+
/**
|
|
164
|
+
* Engine-level vocabulary: the relation prefixes the Casbin MODEL declares — `p` for permission
|
|
165
|
+
* policies and `g`/`g2`…`g5` for grouping relations. This is the low-level building block that
|
|
166
|
+
* {@link AuthorizationPolicyVariants} maps onto (many app edge-types → one rule, e.g. both
|
|
167
|
+
* `assign_role` and `role_inherits` use `g`). Keep these in sync with the model's `[role_definition]`.
|
|
168
|
+
*/
|
|
169
|
+
class CasbinRuleVariants {
|
|
170
|
+
/** Permission policy line. */
|
|
171
|
+
static { this.P = 'p'; }
|
|
172
|
+
/**
|
|
173
|
+
* Numbered in request-tuple order (`sub → dom → obj → act`) so the matcher reads left-to-right:
|
|
174
|
+
* g (sub), g2/g3 (dom), g4 (obj), g5 (act).
|
|
175
|
+
*/
|
|
176
|
+
/** Grouping #1 — role membership + role inheritance (user→role, role→role). The `sub` axis. */
|
|
177
|
+
static { this.G = 'g'; }
|
|
178
|
+
/** Grouping #2 — user→domain membership (join_domain). The `dom` axis (membership). */
|
|
179
|
+
static { this.G2 = 'g2'; }
|
|
180
|
+
/** Grouping #3 — domain hierarchy. The `dom` axis (nesting). */
|
|
181
|
+
static { this.G3 = 'g3'; }
|
|
182
|
+
/** Grouping #4 — resource hierarchy. The `obj` axis. */
|
|
183
|
+
static { this.G4 = 'g4'; }
|
|
184
|
+
/** Grouping #5 — action hierarchy. The `act` axis. */
|
|
185
|
+
static { this.G5 = 'g5'; }
|
|
186
|
+
}
|
|
129
187
|
exports.CasbinRuleVariants = CasbinRuleVariants;
|
|
188
|
+
/**
|
|
189
|
+
* The kinds of "edge" stored in the single `PolicyDefinition` table. Every row links a `subject`
|
|
190
|
+
* (type + id) to a `target` (type + id); the `variant` column says WHAT kind of link it is.
|
|
191
|
+
*
|
|
192
|
+
* Picture the whole RBAC state as a graph — nodes are User / Role / Permission / Domain, and each
|
|
193
|
+
* PolicyDefinition row is one edge. `ScopedCasbinAdapter` reads these rows and emits one casbin line
|
|
194
|
+
* per edge. Each entry below carries:
|
|
195
|
+
* - `action` — the value stored in the DB `variant` column (what the adapter filters on).
|
|
196
|
+
* - `rule` — the casbin grouping/policy prefix the adapter emits for that edge (`p`, `g`, `g2`…).
|
|
197
|
+
*
|
|
198
|
+
* Per-USER edges (differ per user): GRANT, ASSIGN_ROLE, JOIN_DOMAIN.
|
|
199
|
+
* Shared HIERARCHY edges (same for everyone — describe the org structure, not a user):
|
|
200
|
+
* ROLE_INHERITS, RESOURCE_INHERITS, ACTION_INHERITS, DOMAIN_INHERITS.
|
|
201
|
+
*/
|
|
202
|
+
class AuthorizationPolicyVariants {
|
|
203
|
+
/**
|
|
204
|
+
* Give a Permission to a User or Role (the grant row also carries action / effect / domain).
|
|
205
|
+
* casbin `p`: `p, <Role|User>_<id>, <domain>, <permissionCode>, <action>, <allow|deny>`
|
|
206
|
+
* e.g. `p, Role_5, ANY_MEMBER, Order, read, allow` — "Role 5 may read Order in any joined domain".
|
|
207
|
+
*/
|
|
208
|
+
static { this.GRANT = { action: 'grant', rule: CasbinRuleVariants.P }; }
|
|
209
|
+
/**
|
|
210
|
+
* Give a User a Role (optionally scoped to a domain; no domain → `*` = every domain).
|
|
211
|
+
* casbin `g`: `g, User_<id>, Role_<id>, <domain|*>`
|
|
212
|
+
* e.g. `g, User_42, Role_5, *` — "User 42 holds Role 5 everywhere".
|
|
213
|
+
*/
|
|
214
|
+
static { this.ASSIGN_ROLE = { action: 'assign_role', rule: CasbinRuleVariants.G }; }
|
|
215
|
+
/**
|
|
216
|
+
* A Role inherits another Role (DAG). Shares the `g` relation with ASSIGN_ROLE so a
|
|
217
|
+
* user → role → parent-role chain resolves in one lookup. Emitted with domain `*`.
|
|
218
|
+
* casbin `g`: `g, Role_<child>, Role_<parent>, *`
|
|
219
|
+
* e.g. `g, Role_5, Role_9, *` — "Role 5 inherits everything Role 9 has".
|
|
220
|
+
*/
|
|
221
|
+
static { this.ROLE_INHERITS = { action: 'role_inherits', rule: CasbinRuleVariants.G }; }
|
|
222
|
+
/**
|
|
223
|
+
* A User is a member of a Domain. Powers the `ANY_MEMBER` grant scope — a grant with domain
|
|
224
|
+
* `ANY_MEMBER` applies in every domain the user joined. Matcher uses `g2(r.sub, r.dom)`.
|
|
225
|
+
* casbin `g2`: `g2, User_<id>, <Type>_<domainId>`
|
|
226
|
+
* e.g. `g2, User_42, Merchant_7` — "User 42 is a member of Merchant 7".
|
|
227
|
+
*/
|
|
228
|
+
static { this.JOIN_DOMAIN = { action: 'join_domain', rule: CasbinRuleVariants.G2 }; }
|
|
229
|
+
/**
|
|
230
|
+
* DOMAIN axis (the `dom` of a request). One domain is nested under a parent domain.
|
|
231
|
+
* Matcher: `g3(r.dom, p.dom)` (+ self-link, so an exact domain always matches itself).
|
|
232
|
+
* casbin `g3`: `g3, <Type>_<childId>, <Type>_<parentId>`
|
|
233
|
+
* e.g. `g3, Branch_1, Company_9` — "a grant scoped to Company 9 also applies in Branch 1".
|
|
234
|
+
*/
|
|
235
|
+
static { this.DOMAIN_INHERITS = {
|
|
236
|
+
action: 'domain_inherits',
|
|
237
|
+
rule: CasbinRuleVariants.G3,
|
|
238
|
+
}; }
|
|
239
|
+
/**
|
|
240
|
+
* RESOURCE axis (the `obj` of a request). One resource is nested under a broader one — for
|
|
241
|
+
* NON-standard nesting only; dotted nesting (`Order.findById ⊂ Order`) is handled by `objectMatch`
|
|
242
|
+
* WITHOUT an edge. Matcher: `objectMatch(r.obj, p.obj) || g4(r.obj, p.obj)`.
|
|
243
|
+
* casbin `g4`: `g4, <childCode>, <parentCode>`
|
|
244
|
+
* e.g. `g4, OrderItem, Order` — "a grant on Order also covers OrderItem".
|
|
245
|
+
*/
|
|
246
|
+
static { this.RESOURCE_INHERITS = {
|
|
247
|
+
action: 'resource_inherits',
|
|
248
|
+
rule: CasbinRuleVariants.G4,
|
|
249
|
+
}; }
|
|
250
|
+
/**
|
|
251
|
+
* ACTION axis (the `act` of a request) — SAME shape as RESOURCE_INHERITS but a DIFFERENT axis: a
|
|
252
|
+
* narrow action is covered by a broader one. No dotted shortcut — needs an explicit edge.
|
|
253
|
+
* Matcher: `g5(r.act, p.act)`.
|
|
254
|
+
* casbin `g5`: `g5, <childAction>, <parentAction>`
|
|
255
|
+
* e.g. `g5, read, manage` — "a grant of manage also allows read".
|
|
256
|
+
* (g4 + g5 combine multiplicatively: a `manage Order` grant covers a `read OrderItem` request.)
|
|
257
|
+
*/
|
|
258
|
+
static { this.ACTION_INHERITS = {
|
|
259
|
+
action: 'action_inherits',
|
|
260
|
+
rule: CasbinRuleVariants.G5,
|
|
261
|
+
}; }
|
|
262
|
+
static { this.ACTION_SCHEME_SET = new Set([
|
|
263
|
+
this.GRANT.action.toString(),
|
|
264
|
+
this.ASSIGN_ROLE.action.toString(),
|
|
265
|
+
this.ROLE_INHERITS.action.toString(),
|
|
266
|
+
this.JOIN_DOMAIN.action.toString(),
|
|
267
|
+
this.DOMAIN_INHERITS.action.toString(),
|
|
268
|
+
this.RESOURCE_INHERITS.action.toString(),
|
|
269
|
+
this.ACTION_INHERITS.action.toString(),
|
|
270
|
+
]); }
|
|
271
|
+
static { this.RULE_SCHEME_SET = new Set([
|
|
272
|
+
this.GRANT.rule.toString(),
|
|
273
|
+
this.ASSIGN_ROLE.rule.toString(),
|
|
274
|
+
this.ROLE_INHERITS.rule.toString(),
|
|
275
|
+
this.JOIN_DOMAIN.rule.toString(),
|
|
276
|
+
this.DOMAIN_INHERITS.rule.toString(),
|
|
277
|
+
this.RESOURCE_INHERITS.rule.toString(),
|
|
278
|
+
this.ACTION_INHERITS.rule.toString(),
|
|
279
|
+
]); }
|
|
280
|
+
static isValidAction(input) {
|
|
281
|
+
return this.ACTION_SCHEME_SET.has(input);
|
|
282
|
+
}
|
|
283
|
+
static isValidRule(input) {
|
|
284
|
+
return this.RULE_SCHEME_SET.has(input);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
exports.AuthorizationPolicyVariants = AuthorizationPolicyVariants;
|
|
130
288
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/constants.ts"],"names":[],"mappings":";;;AACA,iFAAuE;AAEvE,MAAa,aAAa;aACR,UAAK,GAAG,qBAAqB,CAAC;aAC9B,uBAAkB,GAAG,oBAAoB,CAAC;aAC1C,aAAQ,GAAG,wBAAwB,CAAC;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/constants.ts"],"names":[],"mappings":";;;AACA,iFAAuE;AAEvE,MAAa,aAAa;aACR,UAAK,GAAG,qBAAqB,CAAC;aAC9B,uBAAkB,GAAG,oBAAoB,CAAC;aAC1C,aAAQ,GAAG,wBAAwB,CAAC;aACpC,WAAM,GAAG,sBAAsB,CAAC;;AAJlD,sCAKC;AAED,MAAa,oBAAoB;aACf,WAAM,GAAG,QAAQ,CAAC;aAClB,WAAM,GAAG,QAAQ,CAAC;aAClB,WAAM,GAAG,QAAQ,CAAC;aAClB,YAAO,GAAG,SAAS,CAAC;aAEpB,SAAI,GAAG,MAAM,CAAC;aACd,UAAK,GAAG,OAAO,CAAC;aAChB,WAAM,GAAG,QAAQ,CAAC;aAElB,eAAU,GAAG,IAAI,GAAG,CAAC;QACnC,IAAI,CAAC,MAAM;QACX,IAAI,CAAC,MAAM;QACX,I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C;aAEa,oBAAe,GAAG,IAAI,GAAG,CAAC;QACxC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE;QACpC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE;QACtC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,EAAE;KACrC,CAAC,CAAC;IAEH,MAAM,CAAC,aAAa,CAAC,KAAa;QAChC,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,KAAa;QAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;;AA7FH,kEA8FC"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
2
|
export * from './keys';
|
|
3
|
+
export * from './object-match';
|
|
4
|
+
export * from './permission-builder';
|
|
5
|
+
export * from './policy-builder';
|
|
6
|
+
export * from './resolve-request-domain';
|
|
3
7
|
export * from './types';
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC"}
|
|
@@ -16,5 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./keys"), exports);
|
|
19
|
+
__exportStar(require("./object-match"), exports);
|
|
20
|
+
__exportStar(require("./permission-builder"), exports);
|
|
21
|
+
__exportStar(require("./policy-builder"), exports);
|
|
22
|
+
__exportStar(require("./resolve-request-domain"), exports);
|
|
19
23
|
__exportStar(require("./types"), exports);
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,yCAAuB;AACvB,iDAA+B;AAC/B,uDAAqC;AACrC,mDAAiC;AACjC,2DAAyC;AACzC,0CAAwB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resource-hierarchy matcher for casbin `g4`. Decides whether a requested resource node
|
|
3
|
+
* falls under a granted resource node WITHOUT storing the "standard" edges
|
|
4
|
+
* (endpoint ⊂ subject ⊂ *), which are derivable from the dotted `code`.
|
|
5
|
+
*
|
|
6
|
+
* Non-standard edges (e.g. `OrderItem ⊂ Order`) are NOT covered here — those are stored as
|
|
7
|
+
* explicit `resource_inherits` (g4) links and resolved by casbin's role manager.
|
|
8
|
+
*
|
|
9
|
+
* Registered in TWO ways by the enforcer (both required):
|
|
10
|
+
* 1. `enforcer.addFunction('objectMatch', objectMatch)` — lets the matcher call
|
|
11
|
+
* `objectMatch(r.obj, p.obj)` directly for "graph-free" prefix/wildcard matching. casbin's
|
|
12
|
+
* role-manager `hasLink` only traverses stored nodes, so a `g4(...)`-only call can't match
|
|
13
|
+
* `p.obj = '*'` or a subject that isn't a stored g4 vertex — the direct call covers those.
|
|
14
|
+
* 2. `enforcer.addNamedMatchingFunc('g4', objectMatch)` — applies the same semantics when
|
|
15
|
+
* traversing explicit stored `resource_inherits` (g4) edges.
|
|
16
|
+
*
|
|
17
|
+
* @param requested the resource on the request (r.obj), e.g. `Activation.findById`
|
|
18
|
+
* @param granted the resource on the policy (p.obj), e.g. `Activation` or `*`
|
|
19
|
+
*/
|
|
20
|
+
export declare const objectMatch: (requested: string, granted: string) => boolean;
|
|
21
|
+
//# sourceMappingURL=object-match.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-match.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/object-match.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,GAAI,WAAW,MAAM,EAAE,SAAS,MAAM,KAAG,OAUhE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.objectMatch = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Resource-hierarchy matcher for casbin `g4`. Decides whether a requested resource node
|
|
6
|
+
* falls under a granted resource node WITHOUT storing the "standard" edges
|
|
7
|
+
* (endpoint ⊂ subject ⊂ *), which are derivable from the dotted `code`.
|
|
8
|
+
*
|
|
9
|
+
* Non-standard edges (e.g. `OrderItem ⊂ Order`) are NOT covered here — those are stored as
|
|
10
|
+
* explicit `resource_inherits` (g4) links and resolved by casbin's role manager.
|
|
11
|
+
*
|
|
12
|
+
* Registered in TWO ways by the enforcer (both required):
|
|
13
|
+
* 1. `enforcer.addFunction('objectMatch', objectMatch)` — lets the matcher call
|
|
14
|
+
* `objectMatch(r.obj, p.obj)` directly for "graph-free" prefix/wildcard matching. casbin's
|
|
15
|
+
* role-manager `hasLink` only traverses stored nodes, so a `g4(...)`-only call can't match
|
|
16
|
+
* `p.obj = '*'` or a subject that isn't a stored g4 vertex — the direct call covers those.
|
|
17
|
+
* 2. `enforcer.addNamedMatchingFunc('g4', objectMatch)` — applies the same semantics when
|
|
18
|
+
* traversing explicit stored `resource_inherits` (g4) edges.
|
|
19
|
+
*
|
|
20
|
+
* @param requested the resource on the request (r.obj), e.g. `Activation.findById`
|
|
21
|
+
* @param granted the resource on the policy (p.obj), e.g. `Activation` or `*`
|
|
22
|
+
*/
|
|
23
|
+
const objectMatch = (requested, granted) => {
|
|
24
|
+
if (granted === '*') {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
if (requested === granted) {
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return requested.startsWith(`${granted}.`);
|
|
31
|
+
};
|
|
32
|
+
exports.objectMatch = objectMatch;
|
|
33
|
+
//# sourceMappingURL=object-match.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"object-match.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/object-match.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAW,EAAE;IACzE,IAAI,OAAO,KAAK,GAAG,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,SAAS,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,SAAS,CAAC,UAAU,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC;AAC7C,CAAC,CAAC;AAVW,QAAA,WAAW,eAUtB"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { IdType } from '../../../../base';
|
|
2
|
+
import { TNullable } from '../../../../helpers';
|
|
3
|
+
import { TAuthorizationAction } from './constants';
|
|
4
|
+
/**
|
|
5
|
+
* Builders for `Permission` catalog rows (the `obj` axis the scoped matcher resolves).
|
|
6
|
+
*
|
|
7
|
+
* Generic over the name/description type (`TName`) so an app with i18n `name`/`description` columns and
|
|
8
|
+
* one with plain-text names both fit. Produces the framework-owned columns
|
|
9
|
+
* (code/subject/method/action/scope/description/parentId); `description` defaults to `null`.
|
|
10
|
+
* App-specific columns are added by the caller.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AuthorizationPermissionBuilder {
|
|
13
|
+
/** Sentinel `method` for a coarse resource node (a grant target that is not a route). */
|
|
14
|
+
static readonly RESOURCE_NODE_METHOD = "*";
|
|
15
|
+
/** Standard repository method → base action. Unlisted methods (custom ops, aggregates) resolve to `execute`. */
|
|
16
|
+
static readonly METHOD_ACTIONS: Readonly<Record<string, TAuthorizationAction>>;
|
|
17
|
+
/** The CRUD methods {@link crud} generates by default. */
|
|
18
|
+
static readonly DEFAULT_CRUD_METHODS: ReadonlyArray<string>;
|
|
19
|
+
/** Base action for a method: a known CRUD method maps to read/create/update/delete; anything else → `execute`. */
|
|
20
|
+
static actionForMethod(method: string): TAuthorizationAction;
|
|
21
|
+
/** One operation-level permission, `code = <subject>.<method>`. `action` defaults to {@link actionForMethod}. */
|
|
22
|
+
static operation<TName>(opts: {
|
|
23
|
+
subject: string;
|
|
24
|
+
method: string;
|
|
25
|
+
scope: string;
|
|
26
|
+
name: TName;
|
|
27
|
+
description?: TNullable<TName>;
|
|
28
|
+
action?: TAuthorizationAction;
|
|
29
|
+
parentId?: TNullable<IdType>;
|
|
30
|
+
}): {
|
|
31
|
+
code: string;
|
|
32
|
+
subject: string;
|
|
33
|
+
method: string;
|
|
34
|
+
action: string;
|
|
35
|
+
scope: string;
|
|
36
|
+
description: NonNullable<TName> | null;
|
|
37
|
+
parentId: IdType | null;
|
|
38
|
+
name: TName;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A coarse resource node (module or subject) used as a grant target, e.g. `Sale` or `SaleOrder`.
|
|
42
|
+
* `code` is the bare name (no dotted method); `method` is the {@link RESOURCE_NODE_METHOD} sentinel.
|
|
43
|
+
* `action` defaults to `manage` (the broadest), though the grant on this node carries its own action.
|
|
44
|
+
*/
|
|
45
|
+
static resourceNode<TName>(opts: {
|
|
46
|
+
code: string;
|
|
47
|
+
subject?: string;
|
|
48
|
+
scope: string;
|
|
49
|
+
name: TName;
|
|
50
|
+
description?: TNullable<TName>;
|
|
51
|
+
action?: TAuthorizationAction;
|
|
52
|
+
parentId?: TNullable<IdType>;
|
|
53
|
+
}): {
|
|
54
|
+
code: string;
|
|
55
|
+
subject: string;
|
|
56
|
+
method: string;
|
|
57
|
+
action: string;
|
|
58
|
+
scope: string;
|
|
59
|
+
description: NonNullable<TName> | null;
|
|
60
|
+
parentId: IdType | null;
|
|
61
|
+
name: TName;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* The CRUD permission set for a subject. `name` (and optional `description`) are per-method formatters,
|
|
65
|
+
* so the app supplies its own labels/i18n; the framework only owns the method→action map and code shape.
|
|
66
|
+
*/
|
|
67
|
+
static crud<TName>(opts: {
|
|
68
|
+
subject: string;
|
|
69
|
+
scope: string;
|
|
70
|
+
name: (ctx: {
|
|
71
|
+
subject: string;
|
|
72
|
+
method: string;
|
|
73
|
+
action: TAuthorizationAction;
|
|
74
|
+
}) => TName;
|
|
75
|
+
description?: (ctx: {
|
|
76
|
+
subject: string;
|
|
77
|
+
method: string;
|
|
78
|
+
action: TAuthorizationAction;
|
|
79
|
+
}) => TNullable<TName>;
|
|
80
|
+
methods?: ReadonlyArray<string>;
|
|
81
|
+
}): {
|
|
82
|
+
code: string;
|
|
83
|
+
subject: string;
|
|
84
|
+
method: string;
|
|
85
|
+
action: string;
|
|
86
|
+
scope: string;
|
|
87
|
+
description: NonNullable<TName> | null;
|
|
88
|
+
parentId: IdType | null;
|
|
89
|
+
name: TName;
|
|
90
|
+
}[];
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=permission-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-builder.d.ts","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/permission-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAwB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEzE;;;;;;;GAOG;AACH,qBAAa,8BAA8B;IACzC,yFAAyF;IACzF,MAAM,CAAC,QAAQ,CAAC,oBAAoB,OAAO;IAE3C,gHAAgH;IAChH,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAU5E;IAEF,0DAA0D;IAC1D,MAAM,CAAC,QAAQ,CAAC,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAUzD;IAEF,kHAAkH;IAClH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB;IAI5D,iHAAiH;IACjH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE;QAC5B,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,KAAK,CAAC;QACZ,WAAW,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;KAC9B;;;;;;;;;;IAaD;;;;OAIG;IACH,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;QAC/B,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,KAAK,CAAC;QACZ,WAAW,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QAC/B,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B,QAAQ,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;KAC9B;;;;;;;;;;IAaD;;;OAGG;IACH,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,CAAC,GAAG,EAAE;YAAE,OAAO,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,oBAAoB,CAAA;SAAE,KAAK,KAAK,CAAC;QACxF,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE;YAClB,OAAO,EAAE,MAAM,CAAC;YAChB,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,oBAAoB,CAAC;SAC9B,KAAK,SAAS,CAAC,KAAK,CAAC,CAAC;QACvB,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KACjC;;;;;;;;;;CAqBF"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationPermissionBuilder = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
/**
|
|
6
|
+
* Builders for `Permission` catalog rows (the `obj` axis the scoped matcher resolves).
|
|
7
|
+
*
|
|
8
|
+
* Generic over the name/description type (`TName`) so an app with i18n `name`/`description` columns and
|
|
9
|
+
* one with plain-text names both fit. Produces the framework-owned columns
|
|
10
|
+
* (code/subject/method/action/scope/description/parentId); `description` defaults to `null`.
|
|
11
|
+
* App-specific columns are added by the caller.
|
|
12
|
+
*/
|
|
13
|
+
class AuthorizationPermissionBuilder {
|
|
14
|
+
/** Sentinel `method` for a coarse resource node (a grant target that is not a route). */
|
|
15
|
+
static { this.RESOURCE_NODE_METHOD = '*'; }
|
|
16
|
+
/** Standard repository method → base action. Unlisted methods (custom ops, aggregates) resolve to `execute`. */
|
|
17
|
+
static { this.METHOD_ACTIONS = {
|
|
18
|
+
find: constants_1.AuthorizationActions.READ,
|
|
19
|
+
findById: constants_1.AuthorizationActions.READ,
|
|
20
|
+
findOne: constants_1.AuthorizationActions.READ,
|
|
21
|
+
count: constants_1.AuthorizationActions.READ,
|
|
22
|
+
create: constants_1.AuthorizationActions.CREATE,
|
|
23
|
+
updateById: constants_1.AuthorizationActions.UPDATE,
|
|
24
|
+
updateBy: constants_1.AuthorizationActions.UPDATE,
|
|
25
|
+
deleteById: constants_1.AuthorizationActions.DELETE,
|
|
26
|
+
deleteBy: constants_1.AuthorizationActions.DELETE,
|
|
27
|
+
}; }
|
|
28
|
+
/** The CRUD methods {@link crud} generates by default. */
|
|
29
|
+
static { this.DEFAULT_CRUD_METHODS = [
|
|
30
|
+
'find',
|
|
31
|
+
'findById',
|
|
32
|
+
'findOne',
|
|
33
|
+
'count',
|
|
34
|
+
'create',
|
|
35
|
+
'updateById',
|
|
36
|
+
'updateBy',
|
|
37
|
+
'deleteById',
|
|
38
|
+
'deleteBy',
|
|
39
|
+
]; }
|
|
40
|
+
/** Base action for a method: a known CRUD method maps to read/create/update/delete; anything else → `execute`. */
|
|
41
|
+
static actionForMethod(method) {
|
|
42
|
+
return AuthorizationPermissionBuilder.METHOD_ACTIONS[method] ?? constants_1.AuthorizationActions.EXECUTE;
|
|
43
|
+
}
|
|
44
|
+
/** One operation-level permission, `code = <subject>.<method>`. `action` defaults to {@link actionForMethod}. */
|
|
45
|
+
static operation(opts) {
|
|
46
|
+
return {
|
|
47
|
+
code: [opts.subject, opts.method].join('.'),
|
|
48
|
+
subject: opts.subject,
|
|
49
|
+
method: opts.method,
|
|
50
|
+
action: opts.action ?? AuthorizationPermissionBuilder.actionForMethod(opts.method),
|
|
51
|
+
scope: opts.scope,
|
|
52
|
+
description: opts.description ?? null,
|
|
53
|
+
parentId: opts.parentId ?? null,
|
|
54
|
+
name: opts.name,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A coarse resource node (module or subject) used as a grant target, e.g. `Sale` or `SaleOrder`.
|
|
59
|
+
* `code` is the bare name (no dotted method); `method` is the {@link RESOURCE_NODE_METHOD} sentinel.
|
|
60
|
+
* `action` defaults to `manage` (the broadest), though the grant on this node carries its own action.
|
|
61
|
+
*/
|
|
62
|
+
static resourceNode(opts) {
|
|
63
|
+
return {
|
|
64
|
+
code: opts.code,
|
|
65
|
+
subject: opts.subject ?? opts.code,
|
|
66
|
+
method: AuthorizationPermissionBuilder.RESOURCE_NODE_METHOD,
|
|
67
|
+
action: opts.action ?? constants_1.AuthorizationActions.MANAGE,
|
|
68
|
+
scope: opts.scope,
|
|
69
|
+
description: opts.description ?? null,
|
|
70
|
+
parentId: opts.parentId ?? null,
|
|
71
|
+
name: opts.name,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The CRUD permission set for a subject. `name` (and optional `description`) are per-method formatters,
|
|
76
|
+
* so the app supplies its own labels/i18n; the framework only owns the method→action map and code shape.
|
|
77
|
+
*/
|
|
78
|
+
static crud(opts) {
|
|
79
|
+
const methods = opts.methods ?? AuthorizationPermissionBuilder.DEFAULT_CRUD_METHODS;
|
|
80
|
+
return methods.map(method => {
|
|
81
|
+
const action = AuthorizationPermissionBuilder.actionForMethod(method);
|
|
82
|
+
const ctx = {
|
|
83
|
+
subject: opts.subject,
|
|
84
|
+
method,
|
|
85
|
+
action,
|
|
86
|
+
};
|
|
87
|
+
return AuthorizationPermissionBuilder.operation({
|
|
88
|
+
subject: opts.subject,
|
|
89
|
+
method,
|
|
90
|
+
scope: opts.scope,
|
|
91
|
+
action,
|
|
92
|
+
name: opts.name(ctx),
|
|
93
|
+
description: opts.description ? opts.description(ctx) : undefined,
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
exports.AuthorizationPermissionBuilder = AuthorizationPermissionBuilder;
|
|
99
|
+
//# sourceMappingURL=permission-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-builder.js","sourceRoot":"","sources":["../../../../../src/components/auth/authorize/common/permission-builder.ts"],"names":[],"mappings":";;;AAEA,2CAAyE;AAEzE;;;;;;;GAOG;AACH,MAAa,8BAA8B;IACzC,yFAAyF;aACzE,yBAAoB,GAAG,GAAG,CAAC;IAE3C,gHAAgH;aAChG,mBAAc,GAAmD;QAC/E,IAAI,EAAE,gCAAoB,CAAC,IAAI;QAC/B,QAAQ,EAAE,gCAAoB,CAAC,IAAI;QACnC,OAAO,EAAE,gCAAoB,CAAC,IAAI;QAClC,KAAK,EAAE,gCAAoB,CAAC,IAAI;QAChC,MAAM,EAAE,gCAAoB,CAAC,MAAM;QACnC,UAAU,EAAE,gCAAoB,CAAC,MAAM;QACvC,QAAQ,EAAE,gCAAoB,CAAC,MAAM;QACrC,UAAU,EAAE,gCAAoB,CAAC,MAAM;QACvC,QAAQ,EAAE,gCAAoB,CAAC,MAAM;KACtC,CAAC;IAEF,0DAA0D;aAC1C,yBAAoB,GAA0B;QAC5D,MAAM;QACN,UAAU;QACV,SAAS;QACT,OAAO;QACP,QAAQ;QACR,YAAY;QACZ,UAAU;QACV,YAAY;QACZ,UAAU;KACX,CAAC;IAEF,kHAAkH;IAClH,MAAM,CAAC,eAAe,CAAC,MAAc;QACnC,OAAO,8BAA8B,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,gCAAoB,CAAC,OAAO,CAAC;IAC/F,CAAC;IAED,iHAAiH;IACjH,MAAM,CAAC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