ps-toolkit-ui 1.3.38 → 1.3.39
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/bundles/ps-toolkit-ui.umd.js +3 -3
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/base.component.js +4 -4
- package/fesm2015/ps-toolkit-ui.js +3 -3
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -7132,7 +7132,7 @@
|
|
|
7132
7132
|
if (v === void 0) { v = null; }
|
|
7133
7133
|
return app.getL("" + c + (a ? "." + a : ''), key, v);
|
|
7134
7134
|
};
|
|
7135
|
-
if (app.
|
|
7135
|
+
if (app.currentData.user !== null) {
|
|
7136
7136
|
this.permissions = this.getPermission(this.c, this.a);
|
|
7137
7137
|
if (this.permissions) {
|
|
7138
7138
|
this.permissions.Area = app.area;
|
|
@@ -7141,7 +7141,7 @@
|
|
|
7141
7141
|
}
|
|
7142
7142
|
BaseComponent.prototype.getPermission = function (c, a) {
|
|
7143
7143
|
if (a === void 0) { a = null; }
|
|
7144
|
-
var p = this.app.
|
|
7144
|
+
var p = this.app.currentData.permissions.filter(function (per) { return per.Controller === c && (a == null || per.Action === a) &&
|
|
7145
7145
|
per.Type === exports.PermissionTypeEnum.Item; });
|
|
7146
7146
|
return p.length > 0 ? this.getPermissionClass(p[0]) : null;
|
|
7147
7147
|
};
|
|
@@ -7150,7 +7150,7 @@
|
|
|
7150
7150
|
};
|
|
7151
7151
|
BaseComponent.prototype.getPermissionAccessesClass = function (parentId) {
|
|
7152
7152
|
var _this = this;
|
|
7153
|
-
return this.app.
|
|
7153
|
+
return this.app.currentData.permissions.filter(function (x) { return x.ParentId === parentId; }).map(function (x) { return _this.getPermissionClass(x); });
|
|
7154
7154
|
};
|
|
7155
7155
|
BaseComponent.prototype.hasAccess = function (a) {
|
|
7156
7156
|
return this.permissions ? this.permissions.hasAccessByName(a) : false;
|