This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch 4.19 in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.19 by this push: new 7a0cd55e989 ui: fix user create featured template from volume (#9253) 7a0cd55e989 is described below commit 7a0cd55e9898877c92e160377f0383bcba955ec4 Author: Abhishek Kumar <abhishek.mr...@gmail.com> AuthorDate: Wed Jun 19 12:22:12 2024 +0530 ui: fix user create featured template from volume (#9253) Signed-off-by: Abhishek Kumar <abhishek.mr...@gmail.com> --- ui/src/config/section/storage.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 772f2a3fd3b..28c451105a1 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -256,11 +256,17 @@ export default { (record.type !== 'ROOT' && !record.virtualmachineid && !['Allocated', 'Uploaded'].includes(record.state))) }, args: (record, store) => { - var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'ispublic', 'isfeatured', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled'] + var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled'] if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) { fields.push('domainid') fields.push('account') } + if (['Admin'].includes(store.userInfo.roletype) || store.features.userpublictemplateenabled) { + fields.push('ispublic') + } + if (['Admin'].includes(store.userInfo.roletype)) { + fields.push('isfeatured') + } return fields }, mapping: {