bruce-models 0.3.4 → 0.3.6

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.
@@ -3711,7 +3711,7 @@ var ClientFile;
3711
3711
  }
3712
3712
  ClientFile.GetUrl = GetUrl;
3713
3713
  function GetUrlWithExt(api, file) {
3714
- return api.GetBaseUrl() + "/file/" + file + (file.FileExt ? file.FileExt : "");
3714
+ return api.GetBaseUrl() + "/file/" + file.ID + (file.FileExt ? file.FileExt : "");
3715
3715
  }
3716
3716
  ClientFile.GetUrlWithExt = GetUrlWithExt;
3717
3717
  function Get(api, fileId) {
@@ -5039,12 +5039,12 @@ var Session;
5039
5039
  }
5040
5040
  Session.Logout = Logout;
5041
5041
  function IsPermEnabled(session, accountId, perm) {
5042
- var _a;
5042
+ var _a, _b;
5043
5043
  if (!perm) {
5044
5044
  throw ("Perm is required.");
5045
5045
  }
5046
5046
  perm = perm.toLocaleUpperCase();
5047
- var group = (_a = session === null || session === void 0 ? void 0 : session.AccessPermissions) === null || _a === void 0 ? void 0 : _a.find(function (x) { return x["ClientAccount.ID"] == accountId; });
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
5048
  if (!group) {
5049
5049
  return false;
5050
5050
  }