@cloudbase/lowcode-builder 1.10.2 → 1.10.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/lowcode-builder",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "description": "云开发 Tencent CloudBase Framework Low Code Plugin,将低码配置生成完整项目并一键部署云开发资源。",
5
5
  "author": "yhsunshining@gmail.com",
6
6
  "homepage": "https://github.com/TencentCloudBase/cloudbase-framework#readme",
@@ -50,8 +50,7 @@ export async function redirectToLogin($page) {
50
50
  return null
51
51
  }
52
52
 
53
- const accessData = await getAccessPermission(app.id, $page.__internal__.packageName, $page.id, <%= !!isAdminPortal %>)
54
- return { returnResult: accessData?.isAccess };
53
+ return { refreshAccess: true };
55
54
  }
56
55
 
57
56
  await _redirectToLogin($page);
@@ -98,8 +97,9 @@ export async function checkAuth(app, appId, $page) {
98
97
  if (loginPage && !isInPublicPage) {
99
98
  // 开启了手机号授权登录,则判断是否跳转到登录页面
100
99
  const res = await redirectToLogin($page, loginConfig);
101
- if(res !== null) {
102
- return res.returnResult
100
+ if(res?.refreshAccess) {
101
+ const accessData = await getAccessPermission(appId, $page.__internal__.packageName, $page.id, <%= !!isAdminPortal %>)
102
+ return accessData?.isAccess
103
103
  }
104
104
  }
105
105
  } else {
@@ -114,14 +114,16 @@ export async function checkAuth(app, appId, $page) {
114
114
  if (loginPage && !isInPublicPage) {
115
115
  try {
116
116
  const res = await redirectToLogin($page, loginConfig);
117
- if(res !== null) {
118
- return res.returnResult
117
+ if(res?.refreshAccess) {
118
+ const accessData = await getAccessPermission(appId, $page.__internal__.packageName, $page.id, <%= !!isAdminPortal %>)
119
+ return accessData?.isAccess
119
120
  }
120
121
  return false;
121
122
  } catch (e) {
122
123
  const res = await redirectToLogin($page, loginConfig);
123
- if(res !== null) {
124
- return res.returnResult
124
+ if(res?.refreshAccess) {
125
+ const accessData = await getAccessPermission(appId, $page.__internal__.packageName, $page.id, <%= !!isAdminPortal %>)
126
+ return accessData?.isAccess
125
127
  }
126
128
  return false;
127
129
  }