@tachybase/plugin-auth-main-app 1.3.18 → 1.3.20

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.
@@ -1,11 +1,8 @@
1
1
  module.exports = {
2
- "@tachybase/client": "1.3.20",
3
- "@tachybase/module-auth": "1.3.20",
2
+ "@tachybase/client": "1.3.22",
3
+ "@tachybase/module-auth": "1.3.22",
4
4
  "react": "18.3.1",
5
- "@tachybase/schema": "1.3.20",
5
+ "@tachybase/schema": "1.3.39",
6
6
  "antd": "5.22.5",
7
- "@tachybase/server": "1.3.20",
8
- "@tachybase/actions": "1.3.20",
9
- "@tachybase/utils": "1.3.20",
10
- "@tachybase/database": "1.3.20"
7
+ "@tego/server": "1.3.39"
11
8
  };
@@ -1,4 +1,4 @@
1
- import { Context } from '@tachybase/actions';
1
+ import { Context } from '@tego/server';
2
2
  export declare class AuthMainAppController {
3
3
  getMainUser(ctx: Context, next: () => Promise<any>): Promise<any>;
4
4
  get(ctx: Context, next: () => Promise<any>): Promise<any>;
@@ -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("@tachybase/server");
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, import_utils.Controller)("authMainAppConfig")], _getMainUser_dec = [(0, import_utils.Action)("getMainUser", { acl: "public" })], _get_dec = [(0, import_utils.Action)("get", { acl: "public" })], _set_dec = [(0, import_utils.Action)("set", { acl: "public" })];
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("@tachybase/database").CollectionOptions;
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 import_database = require("@tachybase/database");
23
+ var import_server = require("@tego/server");
24
24
  var import_constants = require("../../constants");
25
- var authMainAppConfig_default = (0, import_database.defineCollection)({
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,
@@ -1,4 +1,4 @@
1
- import { Plugin } from '@tachybase/server';
1
+ import { Plugin } from '@tego/server';
2
2
  export declare class PluginAuthMainAppServer extends Plugin {
3
3
  afterAdd(): Promise<void>;
4
4
  beforeLoad(): Promise<void>;
@@ -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("@tachybase/server");
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;
@@ -1,5 +1,4 @@
1
- import Database from '@tachybase/database';
2
- import { Application } from '@tachybase/server';
1
+ import { Application, Database } from '@tego/server';
3
2
  export declare class AuthMainAppService {
4
3
  db: Database;
5
4
  app: Application;
@@ -65,10 +65,10 @@ __export(authMainAppService_exports, {
65
65
  AuthMainAppService: () => AuthMainAppService
66
66
  });
67
67
  module.exports = __toCommonJS(authMainAppService_exports);
68
- var import_utils = require("@tachybase/utils");
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, import_utils.Service)()], _db_dec = [(0, import_utils.Db)()], _app_dec = [(0, import_utils.App)()], _logger_dec = [(0, import_utils.InjectLog)()];
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.18",
4
+ "version": "1.3.20",
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
- "antd": "5.22.5"
12
- },
13
- "peerDependencies": {
14
- "@tachybase/auth": "1.3.20",
15
- "@tachybase/actions": "1.3.20",
16
- "@tachybase/database": "1.3.20",
17
- "@tachybase/client": "1.3.20",
18
- "@tachybase/module-auth": "1.3.20",
19
- "@tachybase/schema": "1.3.20",
20
- "@tachybase/server": "1.3.20",
21
- "@tachybase/test": "1.3.20",
22
- "@tachybase/utils": "1.3.20"
11
+ "@tachybase/schema": "^1.3.39",
12
+ "@tachybase/test": "^1.3.39",
13
+ "@tego/client": "^1.3.39",
14
+ "@tego/server": "^1.3.39",
15
+ "antd": "5.22.5",
16
+ "@tachybase/client": "1.3.22",
17
+ "@tachybase/module-auth": "1.3.22"
23
18
  },
24
19
  "description.zh-CN": "通过主应用登录子应用,子应用可关闭登录",
25
20
  "displayName.zh-CN": "多应用统一登录"