diff --git a/app/javascript/profile/person_demographics.vue b/app/javascript/profile/person_demographics.vue index 3334f7087..187bbc7c6 100644 --- a/app/javascript/profile/person_demographics.vue +++ b/app/javascript/profile/person_demographics.vue @@ -2,42 +2,12 @@
-
Demographics
+
Demographics
-
-
Community memberships
+
Community memberships
-
@@ -87,6 +57,7 @@ import { personModel as model } from "@/store/person.store"; import PersonEditModal from "./person_edit_modal.vue"; import EditButton from '@/components/edit_button'; import DlPerson from './dl_person.vue'; +import personSessionMixin from '@/auth/person_session.mixin'; export default { name: "PersonDemographics", @@ -112,7 +83,8 @@ export default { } }), mixins: [ - modelMixinNoProp + modelMixinNoProp, + personSessionMixin ], computed: { demoFields() { @@ -120,6 +92,10 @@ export default { }, communityFields() { return Object.keys(this.communityData); + }, + canEditInfo() { + // TODO use sensitive data permission in the future + return this.currentUserIsAdmin || this.currentUser.id === this.selected.id; } } }; diff --git a/app/javascript/profile/person_details.vue b/app/javascript/profile/person_details.vue index a3e7865ea..41f123a08 100644 --- a/app/javascript/profile/person_details.vue +++ b/app/javascript/profile/person_details.vue @@ -65,8 +65,11 @@