diff --git a/docs/en/develop/3-1-BaseList-introduction.md b/docs/en/develop/3-1-BaseList-introduction.md index f8fca269..b6721e69 100644 --- a/docs/en/develop/3-1-BaseList-introduction.md +++ b/docs/en/develop/3-1-BaseList-introduction.md @@ -70,7 +70,7 @@ English | [Chinese](../../zh/develop/3-1-BaseList-introduction.md) ## Properties and functions that usually need to be overridden - `policy`: - - The function must be overridden + - The function must be overridden (Fill in the policy that complies with the openstack rules here) - The permission corresponding to the page, if the permission verification fails, data cannot be requested. - Take the volume `src/pages/storage/containers/Volume/index.jsx` as an example @@ -80,6 +80,17 @@ English | [Chinese](../../zh/develop/3-1-BaseList-introduction.md) } ``` +- `aliasPolicy`: + - The function can be overridden (Fill in the custom policy with module prefix here) + - The permission corresponding to the page, if the permission verification fails, data cannot be requested. + - Take the volume `src/pages/storage/containers/Volume/index.jsx` as an example + + ```javascript + get aliasPolicy() { + return 'cinder:volume:get_all'; + } + ``` + - `name` - The function must be overridden - The name corresponding to the page resource. diff --git a/docs/en/develop/3-3-BaseDetail-introduction.md b/docs/en/develop/3-3-BaseDetail-introduction.md index bad891ba..9bdf2e40 100644 --- a/docs/en/develop/3-3-BaseDetail-introduction.md +++ b/docs/en/develop/3-3-BaseDetail-introduction.md @@ -45,7 +45,7 @@ English | [Chinese](../../zh/develop/3-3-BaseDetail-introduction.md) ## Properties and functions that usually need to be overridden - `policy`: - - The function must be overridden + - The function must be overridden (Fill in the policy that complies with the openstack rules here) - The permission corresponding to the page, if the permission verification fails, data cannot be requested. - Take the volume `src/pages/storage/containers/Volume/Detail/index.jsx` as an example @@ -55,6 +55,17 @@ English | [Chinese](../../zh/develop/3-3-BaseDetail-introduction.md) } ``` +- `aliasPolicy`: + - The function can be overridden (Fill in the custom policy with module prefix here) + - The permission corresponding to the page, if the permission verification fails, data cannot be requested. + - Take the volume `src/pages/storage/containers/Volume/Detail/index.jsx` as an example + + ```javascript + get aliasPolicy() { + return 'cinder:volume:get'; + } + ``` + - `name` - The function must be overridden - The name corresponding to the page resource. diff --git a/docs/en/develop/3-6-FormAction-introduction.md b/docs/en/develop/3-6-FormAction-introduction.md index 54c283d0..6045b7bd 100644 --- a/docs/en/develop/3-6-FormAction-introduction.md +++ b/docs/en/develop/3-6-FormAction-introduction.md @@ -92,7 +92,7 @@ English | [Chinese](../../zh/develop/3-6-FormAction-introduction.md) ``` - `policy` - - Static properties + - Static properties (Fill in the policy that complies with the openstack rules here) - The permission corresponding to the page. If the permission verification fails, the operation button will not be displayed on the resource list page - Take the volume `src/pages/storage/containers/Volume/actions/Create/index.jsx` as an example @@ -100,6 +100,15 @@ English | [Chinese](../../zh/develop/3-6-FormAction-introduction.md) static policy = 'volume:create'; ``` +- `aliasPolicy` + - Static properties (Fill in the custom policy with module prefix here) + - The permission corresponding to the page. If the permission verification fails, the operation button will not be displayed on the resource list page + - Take the volume `src/pages/storage/containers/Volume/actions/Create/index.jsx` as an example + + ```javascript + static aliasPolicy = 'cinder:volume:create'; + ``` + - `allowed` - Static functions - Determine whether the operation needs to be disabled diff --git a/docs/en/develop/3-7-ModalAction-introduction.md b/docs/en/develop/3-7-ModalAction-introduction.md index 25a4d946..62668d20 100644 --- a/docs/en/develop/3-7-ModalAction-introduction.md +++ b/docs/en/develop/3-7-ModalAction-introduction.md @@ -79,7 +79,7 @@ English | [简体中文](../../zh/develop/3-7-ModalAction-introduction.md) ``` - `policy` - - Static + - Static (Fill in the policy that complies with the openstack rules here) - Action permission, if the permission verify failed, the action button will not be displayed on the resource list page - Take attach volume as an example `src/pages/compute/containers/Instance/actions/AttachVolume.jsx` : @@ -87,6 +87,15 @@ English | [简体中文](../../zh/develop/3-7-ModalAction-introduction.md) static policy = 'os_compute_api:os-volumes-attachments:create'; ``` +- `aliasPolicy` + - Static (Fill in the custom policy with module prefix here) + - Action permission, if the permission verify failed, the action button will not be displayed on the resource list page + - Take attach volume as an example `src/pages/compute/containers/Instance/actions/AttachVolume.jsx` : + + ```javascript + static aliasPolicy = 'nova:os_compute_api:os-volumes-attachments:create'; + ``` + - `allowed` - Static - Determine whether the action button needs to be disabled diff --git a/docs/en/develop/3-8-ConfirmAction-introduction.md b/docs/en/develop/3-8-ConfirmAction-introduction.md index 95162b7d..f3d47857 100644 --- a/docs/en/develop/3-8-ConfirmAction-introduction.md +++ b/docs/en/develop/3-8-ConfirmAction-introduction.md @@ -78,13 +78,21 @@ English | [简体中文](../../zh/develop/3-8-ConfirmAction-introduction.md) ``` - `policy` - - Action permission, if the permission verify failed, the action button will not be displayed on the resource list page. + - Action permission, if the permission verify failed, the action button will not be displayed on the resource list page. (Fill in the policy that complies with the openstack rules here) - Take stop instance as an example `src/pages/compute/containers/Instance/actions/Stop.jsx` : ```javascript policy = 'os_compute_api:servers:stop'; ``` +- `aliasPolicy` + - Action permission, if the permission verify failed, the action button will not be displayed on the resource list page. (Fill in the custom policy with module prefix here) + - Take stop instance as an example `src/pages/compute/containers/Instance/actions/Stop.jsx` : + + ```javascript + aliasPolicy = 'nova:os_compute_api:servers:stop'; + ``` + - `allowedCheckFunc` - Determine whether the action button needs to be disabled - Return `Boolean` diff --git a/docs/en/develop/3-9-StepAction-introduction.md b/docs/en/develop/3-9-StepAction-introduction.md index a1d3a46f..f66133a5 100644 --- a/docs/en/develop/3-9-StepAction-introduction.md +++ b/docs/en/develop/3-9-StepAction-introduction.md @@ -100,7 +100,7 @@ English | [简体中文](../../zh/develop/3-9-StepAction-introduction.md) ``` - `policy` - - Static attribute + - Static attribute (Fill in the policy that complies with the openstack rules here) - The permission corresponding to the page, if the permission verification fails, the action button will not be displayed on the resource list page - Take create instance as an example `src/pages/compute/containers/Instance/actions/StepCreate/index.jsx` : @@ -111,6 +111,18 @@ English | [简体中文](../../zh/develop/3-9-StepAction-introduction.md) ]; ``` +- `aliasPolicy` + - Static attribute (Fill in the custom policy with module prefix here) + - The permission corresponding to the page, if the permission verification fails, the action button will not be displayed on the resource list page + - Take create instance as an example `src/pages/compute/containers/Instance/actions/StepCreate/index.jsx` : + + ```javascript + static aliasPolicy = [ + 'nova:os_compute_api:servers:create', + 'nova:os_compute_api:os-availability-zone:list', + ]; + ``` + - `allowed` - Static - Determine whether the action button needs to be disabled diff --git a/docs/zh/develop/3-1-BaseList-introduction.md b/docs/zh/develop/3-1-BaseList-introduction.md index d9525caf..c66e7b18 100644 --- a/docs/zh/develop/3-1-BaseList-introduction.md +++ b/docs/zh/develop/3-1-BaseList-introduction.md @@ -70,7 +70,7 @@ ## 通常需要复写的属性与函数 - `policy`: - - 必须复写该函数 + - 必须复写该函数 (此处填写符合openstack规范的policy) - 页面对应的权限,如果权限验证不通过,则无法请求数据。 - 以云硬盘`src/pages/storage/containers/Volume/index.jsx`为例 @@ -80,6 +80,17 @@ } ``` +- `aliasPolicy`: + - 可以复写该函数 (此处填写带模块前缀的自定义policy) + - 页面对应的权限,如果权限验证不通过,则无法请求数据。 + - 以云硬盘`src/pages/storage/containers/Volume/index.jsx`为例 + + ```javascript + get aliasPolicy() { + return 'cinder:volume:get_all'; + } + ``` + - `name` - 必须复写该函数 - 页面资源对应的名称。 diff --git a/docs/zh/develop/3-3-BaseDetail-introduction.md b/docs/zh/develop/3-3-BaseDetail-introduction.md index 15078bb8..71e99ba1 100644 --- a/docs/zh/develop/3-3-BaseDetail-introduction.md +++ b/docs/zh/develop/3-3-BaseDetail-introduction.md @@ -45,7 +45,7 @@ ## 通常需要复写的属性与函数 - `policy`: - - 必须复写该函数 + - 必须复写该函数 (此处填写符合openstack规范的policy) - 页面对应的权限,如果权限验证不通过,则无法请求数据。 - 以云硬盘`src/pages/storage/containers/Volume/Detail/index.jsx`为例 @@ -55,6 +55,17 @@ } ``` +- `aliasPolicy`: + - 可以复写该函数 (此处填写带模块前缀的自定义policy) + - 页面对应的权限,如果权限验证不通过,则无法请求数据。 + - 以云硬盘`src/pages/storage/containers/Volume/Detail/index.jsx`为例 + + ```javascript + get aliasPolicy() { + return 'cinder:volume:get'; + } + ``` + - `name` - 必须复写该函数 - 页面资源对应的名称。 diff --git a/docs/zh/develop/3-6-FormAction-introduction.md b/docs/zh/develop/3-6-FormAction-introduction.md index 594f221f..d719f243 100644 --- a/docs/zh/develop/3-6-FormAction-introduction.md +++ b/docs/zh/develop/3-6-FormAction-introduction.md @@ -92,7 +92,7 @@ ``` - `policy` - - 静态属性 + - 静态属性 (此处填写符合openstack规范的policy) - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 - 以云硬盘`src/pages/storage/containers/Volume/actions/Create/index.jsx`为例 @@ -100,6 +100,15 @@ static policy = 'volume:create'; ``` +- `aliasPolicy` + - 静态属性 (此处填写带模块前缀的自定义policy) + - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 + - 以云硬盘`src/pages/storage/containers/Volume/actions/Create/index.jsx`为例 + + ```javascript + static aliasPolicy = 'cinder:volume:create'; + ``` + - `allowed` - 静态函数 - 判定操作是否需要被禁用 diff --git a/docs/zh/develop/3-7-ModalAction-introduction.md b/docs/zh/develop/3-7-ModalAction-introduction.md index 4351eae2..304fe953 100644 --- a/docs/zh/develop/3-7-ModalAction-introduction.md +++ b/docs/zh/develop/3-7-ModalAction-introduction.md @@ -79,7 +79,7 @@ ``` - `policy` - - 静态属性 + - 静态属性 (此处填写符合openstack规范的policy) - 操作对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 - 以挂载云硬盘`src/pages/compute/containers/Instance/actions/AttachVolume.jsx`为例 @@ -87,6 +87,15 @@ static policy = 'os_compute_api:os-volumes-attachments:create'; ``` +- `aliasPolicy` + - 静态属性 (此处填写带模块前缀的自定义policy) + - 操作对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 + - 以挂载云硬盘`src/pages/compute/containers/Instance/actions/AttachVolume.jsx`为例 + + ```javascript + static aliasPolicy = 'nova:os_compute_api:os-volumes-attachments:create'; + ``` + - `allowed` - 静态函数 - 判定操作是否需要被禁用 diff --git a/docs/zh/develop/3-8-ConfirmAction-introduction.md b/docs/zh/develop/3-8-ConfirmAction-introduction.md index 9ea30a94..2cd98d48 100644 --- a/docs/zh/develop/3-8-ConfirmAction-introduction.md +++ b/docs/zh/develop/3-8-ConfirmAction-introduction.md @@ -78,12 +78,19 @@ ``` - `policy` - - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 + - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 (此处填写符合openstack规范的policy) - 以停止云主机`src/pages/compute/containers/Instance/actions/Stop.jsx`为例 ```javascript policy = 'os_compute_api:servers:stop'; ``` +- `aliasPolicy` + - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 (此处填写带模块前缀的自定义policy) + - 以停止云主机`src/pages/compute/containers/Instance/actions/Stop.jsx`为例 + + ```javascript + aliasPolicy = 'nova:os_compute_api:servers:stop'; + ``` - `allowedCheckFunc` - 判定操作是否需要被禁用 diff --git a/docs/zh/develop/3-9-StepAction-introduction.md b/docs/zh/develop/3-9-StepAction-introduction.md index 3292a1e0..89db619b 100644 --- a/docs/zh/develop/3-9-StepAction-introduction.md +++ b/docs/zh/develop/3-9-StepAction-introduction.md @@ -100,7 +100,7 @@ ``` - `policy` - - 静态属性 + - 静态属性 (此处填写符合openstack规范的policy) - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 - 以创建云主机`src/pages/compute/containers/Instance/actions/StepCreate/index.jsx`为例 @@ -110,6 +110,17 @@ 'os_compute_api:os-availability-zone:list', ]; ``` +- `aliasPolicy` + - 静态属性 (此处填写带模块前缀的自定义policy) + - 页面对应的权限,如果权限验证不通过,则不会在资源列表页面显示该操作按钮 + - 以创建云主机`src/pages/compute/containers/Instance/actions/StepCreate/index.jsx`为例 + + ```javascript + static aliasPolicy = [ + 'nova:os_compute_api:servers:create', + 'nova:os_compute_api:os-availability-zone:list', + ]; + ``` - `allowed` - 静态函数