@next-core/brick-kit 2.178.14 → 2.178.16

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.
@@ -3138,6 +3138,8 @@
3138
3138
  });
3139
3139
  }
3140
3140
  }
3141
+ var usedActions = brickUtils.scanPermissionActionsInAny(menu.itemsResolve);
3142
+ yield validatePermissions(usedActions);
3141
3143
  yield _internalApiGetResolver().resolveOne("reference", _objectSpread__default["default"]({
3142
3144
  transform: "items",
3143
3145
  transformMapArray: false
@@ -4044,6 +4046,20 @@
4044
4046
  return error instanceof brickHttp.HttpAbortError;
4045
4047
  }
4046
4048
 
4049
+ function setLoginStateCookie(location) {
4050
+ // 独立打包应用 登录时间超时后还是由前端控制跳转,后台无法处理设置登录前的 path 和 query 的 cookie 值
4051
+ // 此这场景下前端做下处理
4052
+
4053
+ var {
4054
+ search,
4055
+ pathname
4056
+ } = location;
4057
+ var pathValue = pathname ? window.btoa(encodeURIComponent(pathname)) : "";
4058
+ var searchValue = search ? window.btoa(encodeURIComponent(search)) : "";
4059
+ document.cookie = "SALOGINPATH=".concat(pathValue, "; path=/");
4060
+ document.cookie = "SALOGINQUERY=".concat(searchValue, "; path=/");
4061
+ }
4062
+
4047
4063
  /**
4048
4064
  * 将 http 请求错误转换为可读的字符串。
4049
4065
  *
@@ -4099,6 +4115,7 @@
4099
4115
  onOk: () => {
4100
4116
  var ssoEnabled = getRuntime().getFeatureFlags()["sso-enabled"];
4101
4117
  var history = getHistory();
4118
+ setLoginStateCookie(history.location);
4102
4119
  history.push(ssoEnabled ? "/sso-auth/login" : "/auth/login", {
4103
4120
  from: _objectSpread__default["default"](_objectSpread__default["default"]({}, history.location), {}, {
4104
4121
  state: undefined
@@ -11724,6 +11741,7 @@
11724
11741
  devtoolsHookEmit("rendering");
11725
11742
  unmountTree(mountPoints.bg);
11726
11743
  var redirectToLogin = () => {
11744
+ setLoginStateCookie(location);
11727
11745
  history.replace(_this3.kernel.getFeatureFlags()["sso-enabled"] ? "/sso-auth/login" : "/auth/login", {
11728
11746
  from: location
11729
11747
  });