Fixed Handling rights when managing a list
This commit is contained in:
parent
088008a4bf
commit
54a5797511
1 changed files with 11 additions and 5 deletions
|
@ -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">
|
||||||
|
|
Loading…
Reference in a new issue