@@ -21,15 +21,21 @@ export default {
2121 name : 'offering' ,
2222 title : 'label.menu.service.offerings' ,
2323 icon : 'shopping-outlined' ,
24- permission : [ 'listServiceOfferings' , 'listDiskOfferings' , 'listDomains' ] ,
24+ permission : [ 'listServiceOfferings' , 'listDiskOfferings' ] ,
2525 children : [
2626 {
2727 name : 'computeoffering' ,
2828 title : 'label.compute.offerings' ,
2929 docHelp : 'adminguide/service_offerings.html#compute-and-disk-service-offerings' ,
3030 icon : 'cloud-outlined' ,
31- permission : [ 'listServiceOfferings' , 'listDomains' ] ,
32- params : { isrecursive : 'true' } ,
31+ permission : [ 'listServiceOfferings' ] ,
32+ params : ( ) => {
33+ var params = { }
34+ if ( [ 'Admin' , 'DomainAdmin' ] . includes ( store . getters . userInfo . roletype ) ) {
35+ params = { isrecursive : 'true' }
36+ }
37+ return params
38+ } ,
3339 columns : [ 'name' , 'displaytext' , 'cpunumber' , 'cpuspeed' , 'memory' , 'domain' , 'zone' , 'order' ] ,
3440 details : ( ) => {
3541 var fields = [ 'name' , 'id' , 'displaytext' , 'offerha' , 'provisioningtype' , 'storagetype' , 'iscustomized' , 'iscustomizediops' , 'limitcpuuse' , 'cpunumber' , 'cpuspeed' , 'memory' , 'hosttags' , 'tags' , 'storagetags' , 'domain' , 'zone' , 'created' , 'dynamicscalingenabled' , 'diskofferingstrictness' , 'encryptroot' ]
@@ -51,7 +57,8 @@ export default {
5157 } ,
5258 {
5359 name : 'comments' ,
54- component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) )
60+ component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) ) ,
61+ show : ( record , route , user ) => { return [ 'Admin' , 'DomainAdmin' ] . includes ( user . roletype ) }
5562 }
5663 ] ,
5764 related : [ {
@@ -138,8 +145,14 @@ export default {
138145 title : 'label.disk.offerings' ,
139146 icon : 'hdd-outlined' ,
140147 docHelp : 'adminguide/service_offerings.html#compute-and-disk-service-offerings' ,
141- permission : [ 'listDiskOfferings' , 'listDomains' ] ,
142- params : { isrecursive : 'true' } ,
148+ permission : [ 'listDiskOfferings' ] ,
149+ params : ( ) => {
150+ var params = { }
151+ if ( [ 'Admin' , 'DomainAdmin' ] . includes ( store . getters . userInfo . roletype ) ) {
152+ params = { isrecursive : 'true' }
153+ }
154+ return params
155+ } ,
143156 columns : [ 'name' , 'displaytext' , 'disksize' , 'domain' , 'zone' , 'order' ] ,
144157 details : ( ) => {
145158 var fields = [ 'name' , 'id' , 'displaytext' , 'disksize' , 'provisioningtype' , 'storagetype' , 'iscustomized' , 'disksizestrictness' , 'iscustomizediops' , 'tags' , 'domain' , 'zone' , 'created' , 'encrypt' ]
@@ -157,7 +170,8 @@ export default {
157170 } ,
158171 {
159172 name : 'comments' ,
160- component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) )
173+ component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) ) ,
174+ show : ( record , route , user ) => { return [ 'Admin' , 'DomainAdmin' ] . includes ( user . roletype ) }
161175 }
162176 ] ,
163177 related : [ {
@@ -205,7 +219,7 @@ export default {
205219 title : 'label.backup.offerings' ,
206220 icon : 'cloud-upload-outlined' ,
207221 docHelp : 'adminguide/virtual_machines.html#backup-offerings' ,
208- permission : [ 'listBackupOfferings' , 'listInfrastructure' ] ,
222+ permission : [ 'listBackupOfferings' ] ,
209223 columns : [ 'name' , 'description' , 'zonename' ] ,
210224 details : [ 'name' , 'id' , 'description' , 'externalid' , 'zone' , 'allowuserdrivenbackups' , 'created' ] ,
211225 related : [ {
@@ -246,7 +260,7 @@ export default {
246260 title : 'label.network.offerings' ,
247261 icon : 'wifi-outlined' ,
248262 docHelp : 'adminguide/networking.html#network-offerings' ,
249- permission : [ 'listNetworkOfferings' , 'listInfrastructure' ] ,
263+ permission : [ 'listNetworkOfferings' ] ,
250264 columns : [ 'name' , 'state' , 'guestiptype' , 'traffictype' , 'networkrate' , 'domain' , 'zone' , 'order' ] ,
251265 details : [ 'name' , 'id' , 'displaytext' , 'guestiptype' , 'traffictype' , 'internetprotocol' , 'networkrate' , 'ispersistent' , 'egressdefaultpolicy' , 'availability' , 'conservemode' , 'specifyvlan' , 'specifyipranges' , 'supportspublicaccess' , 'supportsstrechedl2subnet' , 'service' , 'tags' , 'domain' , 'zone' ] ,
252266 resourceType : 'NetworkOffering' ,
@@ -257,7 +271,8 @@ export default {
257271 } ,
258272 {
259273 name : 'comments' ,
260- component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) )
274+ component : shallowRef ( defineAsyncComponent ( ( ) => import ( '@/components/view/AnnotationsTab.vue' ) ) ) ,
275+ show : ( record , route , user ) => { return [ 'Admin' , 'DomainAdmin' ] . includes ( user . roletype ) }
261276 }
262277 ] ,
263278 actions : [ {
@@ -337,7 +352,7 @@ export default {
337352 title : 'label.vpc.offerings' ,
338353 icon : 'deployment-unit-outlined' ,
339354 docHelp : 'plugins/nuage-plugin.html?#vpc-offerings' ,
340- permission : [ 'listVPCOfferings' , 'listInfrastructure' ] ,
355+ permission : [ 'listVPCOfferings' ] ,
341356 resourceType : 'VpcOffering' ,
342357 columns : [ 'name' , 'state' , 'displaytext' , 'domain' , 'zone' , 'order' ] ,
343358 details : [ 'name' , 'id' , 'displaytext' , 'internetprotocol' , 'distributedvpcrouter' , 'tags' , 'service' , 'domain' , 'zone' , 'created' ] ,
0 commit comments