openxiangda 1.0.100 → 1.0.102
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/lib/cli.js +22 -0
- package/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +6 -4
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.mjs +6 -4
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/dist/runtime/react.cjs +6 -4
- package/packages/sdk/dist/runtime/react.cjs.map +1 -1
- package/packages/sdk/dist/runtime/react.mjs +6 -4
- package/packages/sdk/dist/runtime/react.mjs.map +1 -1
package/lib/cli.js
CHANGED
|
@@ -6763,9 +6763,31 @@ async function publishDataViewResources(config, target, dataViews, result) {
|
|
|
6763
6763
|
action: existing ? 'update' : 'create',
|
|
6764
6764
|
id: data?.id,
|
|
6765
6765
|
});
|
|
6766
|
+
if (Array.isArray(body.permissionGroups)) {
|
|
6767
|
+
await publishDataViewPermissionGroups(config, target, dataViewItem.code, body.permissionGroups);
|
|
6768
|
+
result.published.push({
|
|
6769
|
+
kind: 'dataViewPermissionGroup',
|
|
6770
|
+
code: dataViewItem.code,
|
|
6771
|
+
action: 'replace',
|
|
6772
|
+
});
|
|
6773
|
+
}
|
|
6766
6774
|
}
|
|
6767
6775
|
}
|
|
6768
6776
|
|
|
6777
|
+
async function publishDataViewPermissionGroups(config, target, dataViewCode, permissionGroups) {
|
|
6778
|
+
await requestWithAuth(
|
|
6779
|
+
config,
|
|
6780
|
+
target.profileName,
|
|
6781
|
+
`/openxiangda-api/v1/apps/${encodeURIComponent(target.appType)}/data-views/${encodeURIComponent(dataViewCode)}/permission-groups`,
|
|
6782
|
+
{
|
|
6783
|
+
method: 'PUT',
|
|
6784
|
+
body: {
|
|
6785
|
+
groups: permissionGroups,
|
|
6786
|
+
},
|
|
6787
|
+
}
|
|
6788
|
+
);
|
|
6789
|
+
}
|
|
6790
|
+
|
|
6769
6791
|
async function publishRouteResources(config, target, routes, result) {
|
|
6770
6792
|
for (const route of routes) {
|
|
6771
6793
|
const code = route.code || route.resourceCode;
|
package/package.json
CHANGED
|
@@ -4625,6 +4625,8 @@ var OpenXiangdaPageProvider = ({
|
|
|
4625
4625
|
const app = toRuntimeRecord(bootstrap?.app);
|
|
4626
4626
|
const user = toRuntimeRecord(bootstrap?.user);
|
|
4627
4627
|
const permissions = bootstrap?.permissions;
|
|
4628
|
+
const unauthenticatedRuntime = !bootstrap?.user && runtime.error?.type === "unauthenticated";
|
|
4629
|
+
const runtimeGuestUser = unauthenticatedRuntime || user.isGuest === true || user.userType === "guest" || Boolean(getRecordValue3(user, "publicAccess"));
|
|
4628
4630
|
const tenantId = toStringValue(getRecordValue3(app, "tenantId")) || toStringValue(getRecordValue3(user, "tenantId")) || toStringValue(getRecordValue3(app, "tenantCode")) || "";
|
|
4629
4631
|
const appType = runtime.appType || bootstrap?.appType || toStringValue(getRecordValue3(app, "appType"));
|
|
4630
4632
|
const routeInfo = buildBrowserRouteInfo(route);
|
|
@@ -4654,11 +4656,11 @@ var OpenXiangdaPageProvider = ({
|
|
|
4654
4656
|
},
|
|
4655
4657
|
user: {
|
|
4656
4658
|
...user,
|
|
4657
|
-
id: toStringValue(getRecordValue3(user, "id")) || (
|
|
4658
|
-
username: toStringValue(getRecordValue3(user, "username")) || toStringValue(getRecordValue3(user, "name")) || (
|
|
4659
|
+
id: toStringValue(getRecordValue3(user, "id")) || (runtimeGuestUser ? "guest" : "current"),
|
|
4660
|
+
username: toStringValue(getRecordValue3(user, "username")) || toStringValue(getRecordValue3(user, "name")) || (runtimeGuestUser ? "guest" : "current"),
|
|
4659
4661
|
tenantId,
|
|
4660
|
-
isGuest:
|
|
4661
|
-
userType:
|
|
4662
|
+
isGuest: runtimeGuestUser,
|
|
4663
|
+
userType: runtimeGuestUser ? "guest" : "normal"
|
|
4662
4664
|
},
|
|
4663
4665
|
env: {
|
|
4664
4666
|
appType,
|