Skip to content

Commit 7a0cd55

Browse files
authored
ui: fix user create featured template from volume (apache#9253)
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 227c156 commit 7a0cd55

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ui/src/config/section/storage.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,17 @@ export default {
256256
(record.type !== 'ROOT' && !record.virtualmachineid && !['Allocated', 'Uploaded'].includes(record.state)))
257257
},
258258
args: (record, store) => {
259-
var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'ispublic', 'isfeatured', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled']
259+
var fields = ['volumeid', 'name', 'displaytext', 'ostypeid', 'isdynamicallyscalable', 'requireshvm', 'passwordenabled']
260260
if (['Admin', 'DomainAdmin'].includes(store.userInfo.roletype)) {
261261
fields.push('domainid')
262262
fields.push('account')
263263
}
264+
if (['Admin'].includes(store.userInfo.roletype) || store.features.userpublictemplateenabled) {
265+
fields.push('ispublic')
266+
}
267+
if (['Admin'].includes(store.userInfo.roletype)) {
268+
fields.push('isfeatured')
269+
}
264270
return fields
265271
},
266272
mapping: {

0 commit comments

Comments
 (0)