@itilite/iui-user-management 0.4.68 → 0.4.70

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/dist/index.js CHANGED
@@ -35,9 +35,6 @@ function _extends() {
35
35
  };
36
36
  return _extends.apply(this, arguments);
37
37
  }
38
- function _readOnlyError(name) {
39
- throw new TypeError("\"" + name + "\" is read-only");
40
- }
41
38
  function _unsupportedIterableToArray(o, minLen) {
42
39
  if (!o) return;
43
40
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -6525,9 +6522,9 @@ var UserAddEdit = function UserAddEdit(props) {
6525
6522
  }
6526
6523
  var cardApiflag = false;
6527
6524
  if (productAccess.card === false || isCardsAdmin === false) {
6528
- false, _readOnlyError("cardApiflag");
6525
+ cardApiflag = false;
6529
6526
  } else {
6530
- true, _readOnlyError("cardApiflag");
6527
+ cardApiflag = true;
6531
6528
  }
6532
6529
  if (!_isError) {
6533
6530
  if (isEditMode && editUserId || isProfile) {
@@ -6957,6 +6954,9 @@ var UserAddEdit = function UserAddEdit(props) {
6957
6954
  if (p.id === 3 && !isCardsAdmin && !isProfile) {
6958
6955
  p.readOnly = true;
6959
6956
  p.disableText = "Only card admin can change this access.";
6957
+ } else if (p.id === 3 && editUserId === (id === null || id === void 0 ? void 0 : id.toString())) {
6958
+ p.readOnly = true;
6959
+ p.disableText = "You cannot update your own card product";
6960
6960
  }
6961
6961
  return /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
6962
6962
  item: true,