bruce-models 0.3.6 → 0.3.8

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.
@@ -4493,13 +4493,10 @@ var ProjectViewBookmark;
4493
4493
  return __generator(this, function (_a) {
4494
4494
  switch (_a.label) {
4495
4495
  case 0:
4496
- if (!(data === null || data === void 0 ? void 0 : data.ID)) {
4497
- data.ID = ObjectUtils.UId();
4498
- }
4499
4496
  if (!(data === null || data === void 0 ? void 0 : data.Title)) {
4500
4497
  data.Title = data.ID;
4501
4498
  }
4502
- return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + data.ID, data, Api.PrepReqParams())];
4499
+ return [4 /*yield*/, api.POST("ui.view/" + viewId + "/slide/" + (data.ID ? data.ID : ""), data, Api.PrepReqParams())];
4503
4500
  case 1:
4504
4501
  data = _a.sent();
4505
4502
  api.Cache.Remove(GetCacheKey(viewId, data.ID));
@@ -5044,14 +5041,23 @@ var Session;
5044
5041
  throw ("Perm is required.");
5045
5042
  }
5046
5043
  perm = perm.toLocaleUpperCase();
5047
- var group = (_b = (_a = session === null || session === void 0 ? void 0 : session.User) === null || _a === void 0 ? void 0 : _a.AccessPermissions) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x["ClientAccount.ID"] == accountId; });
5048
- if (!group) {
5044
+ var perms = (_b = (_a = session === null || session === void 0 ? void 0 : session.User) === null || _a === void 0 ? void 0 : _a.AccessPermissions) === null || _b === void 0 ? void 0 : _b.find(function (x) { return x["ClientAccount.ID"] == accountId; });
5045
+ if (!perms) {
5049
5046
  return false;
5050
5047
  }
5051
- if (!group.EnabledFeatures) {
5052
- group.EnabledFeatures = [];
5048
+ if (!perms.UserGroups) {
5049
+ perms.UserGroups = [];
5050
+ }
5051
+ for (var i = 0; i < perms.UserGroups.length; i++) {
5052
+ var group = perms.UserGroups[i];
5053
+ if (typeof group != "string") {
5054
+ var features = group.Features;
5055
+ if (features && features.findIndex(function (x) { return x.toLocaleUpperCase() == perm; }) > -1) {
5056
+ return true;
5057
+ }
5058
+ }
5053
5059
  }
5054
- return group.EnabledFeatures.findIndex(function (x) { return x.toLocaleUpperCase() == perm; }) > -1;
5060
+ return false;
5055
5061
  }
5056
5062
  Session.IsPermEnabled = IsPermEnabled;
5057
5063
  function IsSuperPermEnabled(session, perm) {