fix permissions of GUI elements
This commit is contained in:
parent
8181b7eaaa
commit
56054be3a6
2 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
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() {
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
<span v-else class="button-spacer"> </span>
|
||||
<h2 id="toolbar-title" class="md-title"><router-link :to="{name: 'home'}" class="home-link">ibt2</router-link></h2>
|
||||
<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-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-button>
|
||||
<span id="logged-in" class="md-subheading">
|
||||
|
|
Loading…
Reference in a new issue