diff --git a/src/views/feature/Feature_detail.vue b/src/views/feature/Feature_detail.vue index 2ee8f4ce89f9546099471b08a918414d84b65e1e..2cb162d18e2a0fd05a3c4fc4ff4566b9ffcd0f01 100644 --- a/src/views/feature/Feature_detail.vue +++ b/src/views/feature/Feature_detail.vue @@ -22,7 +22,10 @@ <i class="plus fitted icon"></i> </router-link> <router-link - v-if="permissions && permissions.can_update_feature" + v-if=" + (permissions && permissions.can_update_feature) || + isFeatureCreator + " :to="{ name: 'editer-signalement', params: { @@ -429,6 +432,13 @@ export default { console.log("result", result); return result; }, + + isFeatureCreator() { + if (this.feature && this.user) { + return this.feature.creator === this.user.id; + } + return false; + }, }, methods: {