@tachybase/plugin-auth-main-app 1.3.19 → 1.3.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/dist/externalVersion.js +4 -7
- package/dist/server/actions/authMainApp.d.ts +1 -1
- package/dist/server/actions/authMainApp.js +3 -5
- package/dist/server/collections/authMainAppConfig.d.ts +1 -1
- package/dist/server/collections/authMainAppConfig.js +2 -2
- package/dist/server/plugin.d.ts +1 -1
- package/dist/server/plugin.js +1 -1
- package/dist/server/service/authMainAppService.d.ts +1 -2
- package/dist/server/service/authMainAppService.js +2 -2
- package/package.json +8 -13
package/dist/externalVersion.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
"@tachybase/client": "1.3.
|
|
3
|
-
"@tachybase/module-auth": "1.3.
|
|
2
|
+
"@tachybase/client": "1.3.23",
|
|
3
|
+
"@tachybase/module-auth": "1.3.23",
|
|
4
4
|
"react": "18.3.1",
|
|
5
|
-
"@tachybase/schema": "1.3.
|
|
5
|
+
"@tachybase/schema": "1.3.43",
|
|
6
6
|
"antd": "5.22.5",
|
|
7
|
-
"@
|
|
8
|
-
"@tachybase/actions": "1.3.21",
|
|
9
|
-
"@tachybase/utils": "1.3.21",
|
|
10
|
-
"@tachybase/database": "1.3.21"
|
|
7
|
+
"@tego/server": "1.3.43"
|
|
11
8
|
};
|
|
@@ -65,11 +65,10 @@ __export(authMainApp_exports, {
|
|
|
65
65
|
AuthMainAppController: () => AuthMainAppController
|
|
66
66
|
});
|
|
67
67
|
module.exports = __toCommonJS(authMainApp_exports);
|
|
68
|
-
var import_server = require("@
|
|
69
|
-
var import_utils = require("@tachybase/utils");
|
|
68
|
+
var import_server = require("@tego/server");
|
|
70
69
|
var import_constants = require("../../constants");
|
|
71
70
|
var _set_dec, _get_dec, _getMainUser_dec, _AuthMainAppController_decorators, _init;
|
|
72
|
-
_AuthMainAppController_decorators = [(0,
|
|
71
|
+
_AuthMainAppController_decorators = [(0, import_server.Controller)("authMainAppConfig")], _getMainUser_dec = [(0, import_server.Action)("getMainUser", { acl: "public" })], _get_dec = [(0, import_server.Action)("get", { acl: "public" })], _set_dec = [(0, import_server.Action)("set", { acl: "public" })];
|
|
73
72
|
class AuthMainAppController {
|
|
74
73
|
constructor() {
|
|
75
74
|
__runInitializers(_init, 5, this);
|
|
@@ -91,8 +90,7 @@ class AuthMainAppController {
|
|
|
91
90
|
const multiAppRepo = mainApp.db.getRepository("applications");
|
|
92
91
|
const multiApp = await multiAppRepo.findOne({
|
|
93
92
|
filter: {
|
|
94
|
-
name: ctx.app.name,
|
|
95
|
-
createdById: user.userId
|
|
93
|
+
$and: [{ name: ctx.app.name }, { $or: [{ createdById: user.userId }, { partners: { id: user.userId } }] }]
|
|
96
94
|
}
|
|
97
95
|
});
|
|
98
96
|
if (!multiApp) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("@
|
|
1
|
+
declare const _default: import("@tego/server").CollectionOptions;
|
|
2
2
|
export default _default;
|
|
@@ -20,9 +20,9 @@ __export(authMainAppConfig_exports, {
|
|
|
20
20
|
default: () => authMainAppConfig_default
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(authMainAppConfig_exports);
|
|
23
|
-
var
|
|
23
|
+
var import_server = require("@tego/server");
|
|
24
24
|
var import_constants = require("../../constants");
|
|
25
|
-
var authMainAppConfig_default = (0,
|
|
25
|
+
var authMainAppConfig_default = (0, import_server.defineCollection)({
|
|
26
26
|
dumpRules: "required",
|
|
27
27
|
name: import_constants.COLLECTION_AUTH_MAIN_APP_CONFIG,
|
|
28
28
|
updatedAt: true,
|
package/dist/server/plugin.d.ts
CHANGED
package/dist/server/plugin.js
CHANGED
|
@@ -66,7 +66,7 @@ __export(plugin_exports, {
|
|
|
66
66
|
default: () => plugin_default
|
|
67
67
|
});
|
|
68
68
|
module.exports = __toCommonJS(plugin_exports);
|
|
69
|
-
var import_server = require("@
|
|
69
|
+
var import_server = require("@tego/server");
|
|
70
70
|
var import_authMainApp = require("./actions/authMainApp");
|
|
71
71
|
var import_authMainAppService = require("./service/authMainAppService");
|
|
72
72
|
var _PluginAuthMainAppServer_decorators, _init, _a;
|
|
@@ -65,10 +65,10 @@ __export(authMainAppService_exports, {
|
|
|
65
65
|
AuthMainAppService: () => AuthMainAppService
|
|
66
66
|
});
|
|
67
67
|
module.exports = __toCommonJS(authMainAppService_exports);
|
|
68
|
-
var
|
|
68
|
+
var import_server = require("@tego/server");
|
|
69
69
|
var import_constants = require("../../constants");
|
|
70
70
|
var _logger_dec, _app_dec, _db_dec, _AuthMainAppService_decorators, _init;
|
|
71
|
-
_AuthMainAppService_decorators = [(0,
|
|
71
|
+
_AuthMainAppService_decorators = [(0, import_server.Service)()], _db_dec = [(0, import_server.Db)()], _app_dec = [(0, import_server.App)()], _logger_dec = [(0, import_server.InjectLog)()];
|
|
72
72
|
class AuthMainAppService {
|
|
73
73
|
constructor() {
|
|
74
74
|
this.db = __runInitializers(_init, 8, this), __runInitializers(_init, 11, this);
|
package/package.json
CHANGED
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-auth-main-app",
|
|
3
3
|
"displayName": "Single Sign-On on multi app (SSO)",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.21",
|
|
5
5
|
"description": "Users log in via the main application; sub-applications can disable their standalone login.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Authentication"
|
|
8
8
|
],
|
|
9
9
|
"main": "dist/server/index.js",
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"@
|
|
15
|
-
"
|
|
16
|
-
"@tachybase/client": "1.3.
|
|
17
|
-
"@tachybase/
|
|
18
|
-
"@tachybase/module-auth": "1.3.21",
|
|
19
|
-
"@tachybase/server": "1.3.21",
|
|
20
|
-
"@tachybase/database": "1.3.21",
|
|
21
|
-
"@tachybase/test": "1.3.21",
|
|
22
|
-
"@tachybase/utils": "1.3.21"
|
|
11
|
+
"@tachybase/schema": "^1.3.43",
|
|
12
|
+
"@tachybase/test": "^1.3.43",
|
|
13
|
+
"@tego/client": "^1.3.43",
|
|
14
|
+
"@tego/server": "^1.3.43",
|
|
15
|
+
"antd": "5.22.5",
|
|
16
|
+
"@tachybase/client": "1.3.23",
|
|
17
|
+
"@tachybase/module-auth": "1.3.23"
|
|
23
18
|
},
|
|
24
19
|
"description.zh-CN": "通过主应用登录子应用,子应用可关闭登录",
|
|
25
20
|
"displayName.zh-CN": "多应用统一登录"
|