image: Allows viewing delete/copy iso/template buttons for non ready resources and enables settings (#517)

Fixes #511

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Pearl Dsilva 2020-07-08 13:01:23 +05:30 committed by Rohit Yadav
parent 1647c55639
commit bd134a4fc1
2 changed files with 3 additions and 3 deletions

View File

@ -173,7 +173,8 @@ export default {
},
isAdminOrOwner () {
return ['Admin'].includes(this.$store.getters.userInfo.roletype) ||
(this.resource.domainid === this.$store.getters.userInfo.domainid && this.resource.account === this.$store.getters.userInfo.account)
(this.resource.domainid === this.$store.getters.userInfo.domainid && this.resource.account === this.$store.getters.userInfo.account) ||
this.resource.project && this.resource.projectid === this.$store.getters.project.id
},
runApi () {
var apiName = ''

View File

@ -228,8 +228,7 @@ export default {
isActionPermitted () {
return (['Admin'].includes(this.$store.getters.userInfo.roletype) ||
(this.resource.domainid === this.$store.getters.userInfo.domainid && this.resource.account === this.$store.getters.userInfo.account)) &&
!(this.resource.account !== 'SYSTEM' && this.resource.domainid === 1) &&
this.resource.isready
!(this.resource.account !== 'SYSTEM' && this.resource.domainid === 1)
},
deleteIso (record) {
const params = {