vona-cli-set-api 1.0.75 → 1.0.78
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/cli/templates/create/project/basic/boilerplate/package.original.json +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-base/node_modules/.bin/clean-package +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-base/node_modules/.bin/rimraf +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/node_modules/.bin/clean-package +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-index/node_modules/.bin/rimraf +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/dist/.metadata/index.d.ts +6 -6
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/dist/service/passportAdapter.d.ts +1 -2
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/dist/types/index.d.ts +1 -1
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/node_modules/.bin/clean-package +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/node_modules/.bin/rimraf +21 -0
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/.metadata/index.ts +12 -12
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/src/service/passportAdapter.ts +4 -3
- package/cli/templates/create/project/basic/boilerplate/src/suite/a-home/modules/home-user/tsconfig.build.tsbuildinfo +1 -1
- package/dist/lib/bean/cli.bin.tsc.js +8 -9
- package/dist/lib/bean/toolsMetadata/generateOnions.js +10 -4
- package/package.json +5 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../clean-package/bin/main.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../clean-package/bin/main.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -87,13 +87,13 @@ declare module 'vona-module-home-user' {
|
|
|
87
87
|
$columns: <K extends keyof Omit<EntityUserRole, '$column' | '$columns' | '$table'>>(...columns: K[]) => K[];
|
|
88
88
|
}
|
|
89
89
|
interface IEntityOptionsRole {
|
|
90
|
-
fields?: TypeEntityOptionsFields<EntityRole, IEntityOptionsRole['
|
|
90
|
+
fields?: TypeEntityOptionsFields<EntityRole, IEntityOptionsRole['_fieldsMore_']>;
|
|
91
91
|
}
|
|
92
92
|
interface IEntityOptionsUser {
|
|
93
|
-
fields?: TypeEntityOptionsFields<EntityUser, IEntityOptionsUser['
|
|
93
|
+
fields?: TypeEntityOptionsFields<EntityUser, IEntityOptionsUser['_fieldsMore_']>;
|
|
94
94
|
}
|
|
95
95
|
interface IEntityOptionsUserRole {
|
|
96
|
-
fields?: TypeEntityOptionsFields<EntityUserRole, IEntityOptionsUserRole['
|
|
96
|
+
fields?: TypeEntityOptionsFields<EntityUserRole, IEntityOptionsUserRole['_fieldsMore_']>;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
/** service: end */
|
|
@@ -154,13 +154,13 @@ declare module 'vona-module-home-user' {
|
|
|
154
154
|
}
|
|
155
155
|
declare module 'vona-module-home-user' {
|
|
156
156
|
interface IDtoOptionsAuth {
|
|
157
|
-
fields?: TypeEntityOptionsFields<DtoAuth, IDtoOptionsAuth['
|
|
157
|
+
fields?: TypeEntityOptionsFields<DtoAuth, IDtoOptionsAuth['_fieldsMore_']>;
|
|
158
158
|
}
|
|
159
159
|
interface IDtoOptionsPassport {
|
|
160
|
-
fields?: TypeEntityOptionsFields<DtoPassport, IDtoOptionsPassport['
|
|
160
|
+
fields?: TypeEntityOptionsFields<DtoPassport, IDtoOptionsPassport['_fieldsMore_']>;
|
|
161
161
|
}
|
|
162
162
|
interface IDtoOptionsPassportJwt {
|
|
163
|
-
fields?: TypeEntityOptionsFields<DtoPassportJwt, IDtoOptionsPassportJwt['
|
|
163
|
+
fields?: TypeEntityOptionsFields<DtoPassportJwt, IDtoOptionsPassportJwt['_fieldsMore_']>;
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
export * from '../model/user.ts';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { IPassportAdapter, IPassportBase } from 'vona-module-a-user';
|
|
2
2
|
import type { IPassport, IPayloadData } from '../types/passport.ts';
|
|
3
|
-
import type { IUser } from '../types/user.ts';
|
|
4
3
|
import { BeanBase } from 'vona';
|
|
5
4
|
export declare class ServicePassportAdapter extends BeanBase implements IPassportAdapter {
|
|
6
|
-
isAdmin(
|
|
5
|
+
isAdmin(passport: IPassport | undefined): Promise<boolean>;
|
|
7
6
|
setCurrent(passport: IPassport | undefined): Promise<IPassport | undefined>;
|
|
8
7
|
serialize(passport: IPassportBase): Promise<IPayloadData>;
|
|
9
8
|
deserialize(payloadData: IPayloadData): Promise<IPassportBase | undefined>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/bin/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules/clean-package/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/clean-package@2.2.0/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../clean-package/bin/main.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../clean-package/bin/main.js" "$@"
|
|
21
|
+
fi
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/esm/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/dist/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules/rimraf/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/rimraf@6.0.1/node_modules:/Volumes/my-data/cabloy/vona/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
|
|
21
|
+
fi
|
|
@@ -65,9 +65,9 @@ export * from '../config/config.ts';
|
|
|
65
65
|
declare module 'vona-module-a-database' {
|
|
66
66
|
|
|
67
67
|
export interface IEntityRecord {
|
|
68
|
-
'home-user:role': IEntityOptionsRole
|
|
69
|
-
'home-user:user': IEntityOptionsUser
|
|
70
|
-
'home-user:userRole': IEntityOptionsUserRole
|
|
68
|
+
'home-user:role': Omit<IEntityOptionsRole, '_fieldsMore_'>;
|
|
69
|
+
'home-user:user': Omit<IEntityOptionsUser, '_fieldsMore_'>;
|
|
70
|
+
'home-user:userRole': Omit<IEntityOptionsUserRole, '_fieldsMore_'>;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
}
|
|
@@ -102,15 +102,15 @@ declare module 'vona-module-home-user' {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
export interface IEntityOptionsRole {
|
|
105
|
-
fields?: TypeEntityOptionsFields<EntityRole, IEntityOptionsRole['
|
|
105
|
+
fields?: TypeEntityOptionsFields<EntityRole, IEntityOptionsRole['_fieldsMore_']>;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export interface IEntityOptionsUser {
|
|
109
|
-
fields?: TypeEntityOptionsFields<EntityUser, IEntityOptionsUser['
|
|
109
|
+
fields?: TypeEntityOptionsFields<EntityUser, IEntityOptionsUser['_fieldsMore_']>;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export interface IEntityOptionsUserRole {
|
|
113
|
-
fields?: TypeEntityOptionsFields<EntityUserRole, IEntityOptionsUserRole['
|
|
113
|
+
fields?: TypeEntityOptionsFields<EntityUserRole, IEntityOptionsUserRole['_fieldsMore_']>;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
/** service: end */
|
|
@@ -182,9 +182,9 @@ export * from '../model/role.ts';
|
|
|
182
182
|
declare module 'vona-module-a-web' {
|
|
183
183
|
|
|
184
184
|
export interface IDtoRecord {
|
|
185
|
-
'home-user:auth': IDtoOptionsAuth
|
|
186
|
-
'home-user:passport': IDtoOptionsPassport
|
|
187
|
-
'home-user:passportJwt': IDtoOptionsPassportJwt
|
|
185
|
+
'home-user:auth': Omit<IDtoOptionsAuth, '_fieldsMore_'>;
|
|
186
|
+
'home-user:passport': Omit<IDtoOptionsPassport, '_fieldsMore_'>;
|
|
187
|
+
'home-user:passportJwt': Omit<IDtoOptionsPassportJwt, '_fieldsMore_'>;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
}
|
|
@@ -194,15 +194,15 @@ declare module 'vona-module-home-user' {
|
|
|
194
194
|
declare module 'vona-module-home-user' {
|
|
195
195
|
|
|
196
196
|
export interface IDtoOptionsAuth {
|
|
197
|
-
fields?: TypeEntityOptionsFields<DtoAuth, IDtoOptionsAuth['
|
|
197
|
+
fields?: TypeEntityOptionsFields<DtoAuth, IDtoOptionsAuth['_fieldsMore_']>;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
200
|
export interface IDtoOptionsPassport {
|
|
201
|
-
fields?: TypeEntityOptionsFields<DtoPassport, IDtoOptionsPassport['
|
|
201
|
+
fields?: TypeEntityOptionsFields<DtoPassport, IDtoOptionsPassport['_fieldsMore_']>;
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
export interface IDtoOptionsPassportJwt {
|
|
205
|
-
fields?: TypeEntityOptionsFields<DtoPassportJwt, IDtoOptionsPassportJwt['
|
|
205
|
+
fields?: TypeEntityOptionsFields<DtoPassportJwt, IDtoOptionsPassportJwt['_fieldsMore_']>;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
export * from '../model/user.ts';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { IPassportAdapter, IPassportBase } from 'vona-module-a-user';
|
|
2
2
|
import type { IPassport, IPayloadData } from '../types/passport.ts';
|
|
3
|
-
import type { IUser } from '../types/user.ts';
|
|
4
3
|
import { BeanBase } from 'vona';
|
|
4
|
+
import { $getRoleName } from 'vona-module-a-user';
|
|
5
5
|
import { Service } from 'vona-module-a-web';
|
|
6
6
|
|
|
7
7
|
@Service()
|
|
8
8
|
export class ServicePassportAdapter extends BeanBase implements IPassportAdapter {
|
|
9
|
-
async isAdmin(
|
|
10
|
-
|
|
9
|
+
async isAdmin(passport: IPassport | undefined): Promise<boolean> {
|
|
10
|
+
if (!passport || !passport.roles) return false;
|
|
11
|
+
return passport.roles.some(item => $getRoleName(item) === 'admin');
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
async setCurrent(passport: IPassport | undefined): Promise<IPassport | undefined> {
|