openxiangda 1.0.100 → 1.0.101
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/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;
|