@steedos/service-metadata-permissionsets 2.5.3-beta.10 → 2.5.3-beta.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-metadata-permissionsets",
3
- "version": "2.5.3-beta.10",
3
+ "version": "2.5.3-beta.12",
4
4
  "description": "",
5
5
  "main": "lib/permissionsets.service.js",
6
6
  "scripts": {
@@ -32,5 +32,5 @@
32
32
  "publishConfig": {
33
33
  "access": "public"
34
34
  },
35
- "gitHead": "f84a751c28a45aeffd00f4cb2ec1a72cf72658c9"
35
+ "gitHead": "79e9dfbd0bf19a0979f29d2a055cf6e2ea847997"
36
36
  }
@@ -1,3 +1,10 @@
1
+ /*
2
+ * @Author: sunhaolin@hotoa.com
3
+ * @Date: 2021-07-30 09:20:04
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2023-06-09 10:18:09
6
+ * @Description:
7
+ */
1
8
  import _ = require("lodash");
2
9
  import { METADATA_TYPE, PROFILE_METADATA_TYPE } from ".";
3
10
  import { getServicePermissionsetConfig, refreshPermissionset } from "./permissionsets";
@@ -56,7 +63,10 @@ export const ActionHandlers = {
56
63
  }
57
64
  await ctx.broker.call('metadata.addServiceMetadata', {key: cacherKey(metadataApiName), data: config}, {meta: Object.assign({}, ctx.meta, {metadataType: PROFILE_METADATA_TYPE, metadataApiName: metadataApiName})})
58
65
  const profileConfig = await refreshProfile(ctx, metadataApiName);
59
- return await registerProfile(ctx, ctx.params.profileApiName, profileConfig, ctx.meta)
66
+ const result = await registerProfile(ctx, ctx.params.profileApiName, profileConfig, ctx.meta)
67
+ // 触发加载简档事件
68
+ await ctx.broker.emit(`$METADATA.${PROFILE_METADATA_TYPE}.add`, { metadataApiName })
69
+ return result
60
70
  },
61
71
  async getProfiles(ctx: any): Promise<any> {
62
72
  return await ctx.broker.call('metadata.filter', {key: profileCacherKey("*")}, {meta: ctx.meta})