fix permissions of GUI elements

This commit is contained in:
Davide Alberani 2017-01-17 18:46:08 +01:00
parent 8181b7eaaa
commit 56054be3a6
2 changed files with 3 additions and 3 deletions

View file

@ -46,7 +46,7 @@ export default {
methods: { methods: {
isAuthorized(ownerID) { isAuthorized(ownerID) {
return this.$store.state.loggedInUser.isAdmin || (this.$store.state.loggedInUser._id && this.$store.state.loggedInUser._id == ownerID); return !ownerID || this.$store.state.loggedInUser.isAdmin || (this.$store.state.loggedInUser._id && this.$store.state.loggedInUser._id == ownerID);
}, },
editAttendee() { editAttendee() {

View file

@ -8,10 +8,10 @@
<span v-else class="button-spacer">&nbsp;</span> <span v-else class="button-spacer">&nbsp;</span>
<h2 id="toolbar-title" class="md-title"><router-link :to="{name: 'home'}" class="home-link">ibt2</router-link></h2> <h2 id="toolbar-title" class="md-title"><router-link :to="{name: 'home'}" class="home-link">ibt2</router-link></h2>
<span v-if="loggedInUser.username"> <span v-if="loggedInUser.username">
<md-button v-if="loggedInUser.isAdmin" id="users-icon" class="md-icon-button" @click="toUserPage()"> <md-button v-if="loggedInUser.isAdmin" id="users-icon" class="md-icon-button" @click="toUsersPage()">
<md-icon>people_outline</md-icon> <md-icon>people_outline</md-icon>
</md-button> </md-button>
<md-button id="logged-in-icon" class="md-icon-button" @click="toUsersPage()"> <md-button id="logged-in-icon" class="md-icon-button" @click="toUserPage()">
<md-icon>person_pin</md-icon> <md-icon>person_pin</md-icon>
</md-button> </md-button>
<span id="logged-in" class="md-subheading"> <span id="logged-in" class="md-subheading">