Missing commited file

This commit is contained in:
Eliot Berriot 2019-07-18 14:08:16 +02:00
parent 0a71d160a5
commit e3f6baecd4
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
1 changed files with 8 additions and 1 deletions

View File

@ -111,7 +111,14 @@ export default {
if (!this.$store.state.auth.authenticated) {
return false
}
return this.$store.state.auth.availablePermissions['library']
let libraryPermission = this.$store.state.auth.availablePermissions['library']
let objData = this.object || {}
let isOwner = false
if (objData.attributed_to) {
isOwner = this.$store.state.auth.fullUsername === objData.attributed_to.full_username
}
return libraryPermission || isOwner
},
}