From 2e2512019230f299c2c9eae18afec3c8218d2697 Mon Sep 17 00:00:00 2001 From: Tusooa Zhu Date: Wed, 7 Sep 2022 18:46:18 -0400 Subject: Make notes editable only on user profile --- src/components/user_card/user_card.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/components/user_card/user_card.js') diff --git a/src/components/user_card/user_card.js b/src/components/user_card/user_card.js index 65140d4e..67879307 100644 --- a/src/components/user_card/user_card.js +++ b/src/components/user_card/user_card.js @@ -40,7 +40,8 @@ export default { 'rounded', 'bordered', 'avatarAction', // default - open profile, 'zoom' - zoom, function - call function - 'onClose' + 'onClose', + 'hasNoteEditor' ], data () { return { @@ -130,6 +131,9 @@ export default { const privileges = this.loggedIn.privileges return this.loggedIn.role === 'admin' || privileges.includes('users_manage_activation_state') || privileges.includes('users_delete') || privileges.includes('users_manage_tags') }, + hasNote () { + return this.relationship.note + }, supportsNote () { return 'note' in this.relationship }, -- cgit v1.2.3-70-g09d2