You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/28 10:29:29 UTC

[GitHub] [cloudstack-primate] ravening commented on a change in pull request #838: Allow changing template type by admin

ravening commented on a change in pull request #838:
URL: https://github.com/apache/cloudstack-primate/pull/838#discussion_r513334844



##########
File path: src/config/section/image.js
##########
@@ -43,7 +43,15 @@ export default {
         }
         return fields
       },
-      details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created', 'url'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled',
+          'directdownload', 'deployasis', 'isextractable', 'isdynamicallyscalable', 'crosszones', 'type',
+          'account', 'domain', 'created']
+        if (['Admin'].includes(store.getters.userInfo.roletype)) {
+          fields.push('ispublic', 'isrouting', 'isfeatured', 'templatetype', 'url')

Review comment:
       `ispublic` and `isfeatured` is displayed for regular users also. so made the change




----------------------------------------------------------------
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.

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