@chevre/domain 28.0.0-alpha.30 → 28.0.0-alpha.31
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/lib/chevre/repo/role.d.ts +1 -1
- package/lib/chevre/repo/role.js +1 -30
- package/package.json +2 -2
|
@@ -59,7 +59,7 @@ export declare class RoleRepo {
|
|
|
59
59
|
} & {
|
|
60
60
|
__v: number;
|
|
61
61
|
}) | null>;
|
|
62
|
-
|
|
62
|
+
addRole(params: Pick<IRole, 'member' | 'memberOf' | 'permissions' | 'roleName'>): Promise<{
|
|
63
63
|
id: string;
|
|
64
64
|
}>;
|
|
65
65
|
deleteByRoleName(params: Pick<IRole, 'roleName'>): Promise<import("mongodb").DeleteResult>;
|
package/lib/chevre/repo/role.js
CHANGED
|
@@ -69,35 +69,6 @@ class RoleRepo {
|
|
|
69
69
|
.lean() // 2024-08-23~
|
|
70
70
|
.exec();
|
|
71
71
|
}
|
|
72
|
-
// migrate to findDistinctPermissionsByRoleName(2025-07-21~)
|
|
73
|
-
// public async aggregatePermissions(params: {
|
|
74
|
-
// roleName: { $in: string[] };
|
|
75
|
-
// }): Promise<{ _id: string }[]> {
|
|
76
|
-
// const matchStages: IMatchStage[] = [
|
|
77
|
-
// { $match: { roleName: { $in: params.roleName.$in } } }
|
|
78
|
-
// ];
|
|
79
|
-
// const aggregate = this.roleModel.aggregate([
|
|
80
|
-
// ...matchStages,
|
|
81
|
-
// {
|
|
82
|
-
// $unwind: {
|
|
83
|
-
// path: '$permissions'
|
|
84
|
-
// }
|
|
85
|
-
// },
|
|
86
|
-
// {
|
|
87
|
-
// $project: {
|
|
88
|
-
// _id: 0,
|
|
89
|
-
// permission: '$permissions'
|
|
90
|
-
// }
|
|
91
|
-
// },
|
|
92
|
-
// {
|
|
93
|
-
// $group: {
|
|
94
|
-
// _id: '$permission'
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
// ]);
|
|
98
|
-
// return aggregate.option({ maxTimeMS: MONGO_MAX_TIME_MS })
|
|
99
|
-
// .exec();
|
|
100
|
-
// }
|
|
101
72
|
/**
|
|
102
73
|
* distinctコマンドを使用して、ロールから権限を検索する
|
|
103
74
|
*/
|
|
@@ -139,7 +110,7 @@ class RoleRepo {
|
|
|
139
110
|
.lean()
|
|
140
111
|
.exec();
|
|
141
112
|
}
|
|
142
|
-
async
|
|
113
|
+
async addRole(params) {
|
|
143
114
|
const { member, memberOf, permissions, roleName } = params;
|
|
144
115
|
const creatingRole = {
|
|
145
116
|
member, memberOf, permissions, roleName,
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@aws-sdk/client-cognito-identity-provider": "3.1090.0",
|
|
13
13
|
"@aws-sdk/credential-providers": "3.1090.0",
|
|
14
|
-
"@chevre/factory": "11.1.0-alpha.
|
|
14
|
+
"@chevre/factory": "11.1.0-alpha.7",
|
|
15
15
|
"@motionpicture/coa-service": "10.0.0",
|
|
16
16
|
"@motionpicture/gmo-service": "6.1.0-alpha.0",
|
|
17
17
|
"@sendgrid/client": "8.1.4",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"postversion": "git push origin --tags",
|
|
89
89
|
"prepublishOnly": "npm run clean && npm run build"
|
|
90
90
|
},
|
|
91
|
-
"version": "28.0.0-alpha.
|
|
91
|
+
"version": "28.0.0-alpha.31"
|
|
92
92
|
}
|