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:13:17 UTC

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

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



##########
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:
       @ravening cc @weizhouapache @DaanHoogland can you check if this causes regression wrt legacy UI? The is public/routing/features and `url` were previously accepted by old UI as well. What about upload template API/form?




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