@titaui/pc 1.10.70 → 1.10.71

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.
Files changed (2) hide show
  1. package/lib/utils/auth.js +15 -5
  2. package/package.json +1 -1
package/lib/utils/auth.js CHANGED
@@ -92,8 +92,10 @@ var OAuth = /*#__PURE__*/function (_BaseAuth) {
92
92
  }, {
93
93
  key: "isPrincipalUser",
94
94
  value: function isPrincipalUser() {
95
+ var _this$principalUser;
96
+
95
97
  // console.log('o isp', this.userId, this.principalUser.userId)
96
- return this.userId == this.principalUser.userId;
98
+ return this.userId == ((_this$principalUser = this.principalUser) === null || _this$principalUser === void 0 ? void 0 : _this$principalUser.userId);
97
99
  } // 有操作OKR的權限
98
100
 
99
101
  }, {
@@ -139,8 +141,10 @@ var KRAuth = /*#__PURE__*/function (_BaseAuth2) {
139
141
  }, {
140
142
  key: "isPrincipalUser",
141
143
  value: function isPrincipalUser() {
144
+ var _this$user;
145
+
142
146
  // console.log('kr isp', this.userId, this.user.userId)
143
- return this.userId == this.user.userId;
147
+ return this.userId == ((_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user.userId);
144
148
  } // 有操作KR的權限
145
149
 
146
150
  }, {
@@ -178,15 +182,19 @@ var EAuth = /*#__PURE__*/function (_BaseAuth3) {
178
182
  _createClass(EAuth, [{
179
183
  key: "isCreater",
180
184
  value: function isCreater() {
185
+ var _this$user2;
186
+
181
187
  // console.log('e iscreater', this.userId, this.user.userId)
182
- return this.userId == this.user.userId;
188
+ return this.userId == ((_this$user2 = this.user) === null || _this$user2 === void 0 ? void 0 : _this$user2.userId);
183
189
  } // 負責人
184
190
 
185
191
  }, {
186
192
  key: "isPrincipalUser",
187
193
  value: function isPrincipalUser() {
194
+ var _this$principalUser2;
195
+
188
196
  // console.log('e isp', this.userId, this.principalUser.userId)
189
- return this.userId == this.principalUser.userId;
197
+ return this.userId == ((_this$principalUser2 = this.principalUser) === null || _this$principalUser2 === void 0 ? void 0 : _this$principalUser2.userId);
190
198
  } // 有操作KR的權限
191
199
 
192
200
  }, {
@@ -268,7 +276,9 @@ var ChildAuth = /*#__PURE__*/function (_BaseAuth5) {
268
276
  _createClass(ChildAuth, [{
269
277
  key: "isPrincipalUser",
270
278
  value: function isPrincipalUser() {
271
- return this.userId == this.principalUser.userId;
279
+ var _this$principalUser3;
280
+
281
+ return this.userId == ((_this$principalUser3 = this.principalUser) === null || _this$principalUser3 === void 0 ? void 0 : _this$principalUser3.userId);
272
282
  } // 超管、助理、目标管理员以及目标负责人可以修改此目标下对齐子目标的权重;
273
283
 
274
284
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titaui/pc",
3
- "version": "1.10.70",
3
+ "version": "1.10.71",
4
4
  "nameCN": "",
5
5
  "description": "",
6
6
  "main": "lib/index.js",