Fixed Handling rights when managing a list

This commit is contained in:
kolaente 2018-09-18 08:23:04 +02:00
parent 088008a4bf
commit 54a5797511
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 11 additions and 5 deletions

View File

@ -77,27 +77,33 @@
</template> </template>
</td> </td>
<td class="type"> <td class="type">
<template v-if="u.admin"> <template v-if="u.right === 2">
<span class="icon is-small"> <span class="icon is-small">
<icon icon="lock"/> <icon icon="lock"/>
</span> </span>
Admin Admin
</template> </template>
<template v-else-if="u.right === 1">
<span class="icon is-small">
<icon icon="pen"/>
</span>
Write
</template>
<template v-else> <template v-else>
<span class="icon is-small"> <span class="icon is-small">
<icon icon="user"/> <icon icon="users"/>
</span> </span>
Member Read-only
</template> </template>
</td> </td>
<td class="actions" v-if="userIsAdmin"> <td class="actions" v-if="userIsAdmin">
<button @click="toggleUserType(u.id, (u.right === 2))" class="button buttonright is-primary" v-if="u.id !== user.infos.id"> <button @click="toggleUserType(u.id, (u.right === 2))" class="button buttonright is-primary" v-if="u.id !== user.infos.id">
Make Make
<template v-if="u.right === 2"> <template v-if="u.right === 2">
Admin Member
</template> </template>
<template v-else> <template v-else>
Member Admin
</template> </template>
</button> </button>
<button @click="userToDelete = u.id; showUserDeleteModal = true" class="button is-danger" v-if="u.id !== user.infos.id"> <button @click="userToDelete = u.id; showUserDeleteModal = true" class="button is-danger" v-if="u.id !== user.infos.id">