This commit is contained in:
ronger 2021-04-21 09:55:01 +08:00
parent 6dce4282fd
commit 9bc7a5d65f

View File

@ -81,9 +81,13 @@
hasPermissions() { hasPermissions() {
let account = this.$store.state.userInfo?.nickname; let account = this.$store.state.userInfo?.nickname;
if (account) { if (account) {
if (this.$route.params.article_id) {
if (account === this.article.articleAuthor.userNickname) { if (account === this.article.articleAuthor.userNickname) {
return true; return true;
} }
} else {
return true;
}
} }
return this.$store.getters.hasPermissions('blog_admin'); return this.$store.getters.hasPermissions('blog_admin');
} }