DaanHoogland commented on code in PR #10135:
URL: https://github.com/apache/cloudstack/pull/10135#discussion_r1898394887


##########
ui/src/config/section/storage.js:
##########
@@ -223,7 +223,7 @@ export default {
           label: 'label.change.offering.for.volume',
           args: ['id', 'diskofferingid', 'size', 'miniops', 'maxiops', 
'automigrate'],
           dataView: true,
-          show: (record, store) => { return ['Allocated', 
'Ready'].includes(record.state) && ['Admin'].includes(store.userInfo.roletype) 
},
+          show: (record, store) => { return ['Allocated', 
'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) 
|| !!store.apis.changeOfferingForVolume) },

Review Comment:
   is the double exclamation mark an error or some feature I don't know about? 
It would seem to me either one
   ```suggestion
             show: (record, store) => { return ['Allocated', 
'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) 
|| !store.apis.changeOfferingForVolume) },
   ```
    or both
   ```suggestion
             show: (record, store) => { return ['Allocated', 
'Ready'].includes(record.state) && (['Admin'].includes(store.userInfo.roletype) 
|| store.apis.changeOfferingForVolume) },
   ```
    should be removed
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to