permission type rename

This commit is contained in:
Julian Krauser 2025-02-15 11:26:34 +01:00
parent 8033038c2e
commit 9d96a3f921
36 changed files with 128 additions and 108 deletions

View file

@ -4,12 +4,12 @@
<p>{{ award.award }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'award')"
v-if="can('update', 'configuration', 'award')"
:to="{ name: 'admin-settings-award-edit', params: { id: award.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'award')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'award')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -11,12 +11,12 @@
</div>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'calendar_type')"
v-if="can('update', 'configuration', 'calendar_type')"
:to="{ name: 'admin-settings-calendar_type-edit', params: { id: calendarType.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'calendar_type')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'calendar_type')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,12 +4,12 @@
<p>{{ communicationType.type }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'communication_type')"
v-if="can('update', 'configuration', 'communication_type')"
:to="{ name: 'admin-settings-communication_type-edit', params: { id: communicationType.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'communication_type')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'communication_type')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,12 +4,12 @@
<p>{{ executivePosition.position }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'executive_position')"
v-if="can('update', 'configuration', 'executive_position')"
:to="{ name: 'admin-settings-executive_position-edit', params: { id: executivePosition.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'executive_position')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'executive_position')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,12 +4,12 @@
<p>{{ membershipStatus.status }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'membership_status')"
v-if="can('update', 'configuration', 'membership_status')"
:to="{ name: 'admin-settings-membership_status-edit', params: { id: membershipStatus.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'membership_status')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'membership_status')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -2,7 +2,7 @@
<form ref="form" class="flex flex-col h-fit w-full border border-primary rounded-md" @submit.prevent="updateUsage">
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
<p>Newsletter bei Type "{{ comType.type }}" versenden/exportieren als</p>
<div v-if="can('create', 'settings', 'newsletter_config')" class="flex flex-row justify-end w-16">
<div v-if="can('create', 'configuration', 'newsletter_config')" class="flex flex-row justify-end w-16">
<button v-if="status == null" type="submit" class="!p-0 !h-fit !w-fit" title="speichern">
<ArchiveBoxArrowDownIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
</button>

View file

@ -4,12 +4,12 @@
<p>{{ qualification.qualification }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'qualification')"
v-if="can('update', 'configuration', 'qualification')"
:to="{ name: 'admin-settings-qualification-edit', params: { id: qualification.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'qualification')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'qualification')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -6,10 +6,10 @@
<div @click="loadUpdate">
<EyeIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
<div v-if="can('update', 'settings', 'query_store')" @click="loadUpdate">
<div v-if="can('update', 'configuration', 'query_store')" @click="loadUpdate">
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
<div v-if="can('delete', 'settings', 'query_store')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'query_store')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,12 +4,12 @@
<p>{{ salutation.salutation }}</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'settings', 'salutation')"
v-if="can('update', 'configuration', 'salutation')"
:to="{ name: 'admin-settings-salutation-edit', params: { id: salutation.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'settings', 'salutation')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'salutation')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,7 +4,7 @@
<p>{{ template.template }}</p>
<div class="flex flex-row justify-end w-24">
<RouterLink
v-if="can('update', 'settings', 'template')"
v-if="can('update', 'configuration', 'template')"
:to="{ name: 'admin-settings-template-edit', params: { id: template.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
@ -15,7 +15,7 @@
<Spinner v-else-if="status == 'loading'" class="my-auto" />
<SuccessCheckmark v-else-if="status?.status == 'success'" />
<FailureXMark v-else-if="status?.status == 'failed'" />
<div v-if="can('delete', 'settings', 'template')" @click="openDeleteModal">
<div v-if="can('delete', 'configuration', 'template')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -7,7 +7,7 @@
<EyeIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
</button>
<button
v-if="status == null && can('create', 'settings', 'newsletter_config')"
v-if="status == null && can('create', 'configuration', 'newsletter_config')"
type="submit"
class="!p-0 !h-fit !w-fit"
title="speichern"
@ -19,7 +19,7 @@
<FailureXMark v-else-if="status?.status == 'failed'" />
<button
type="button"
v-if="can('create', 'settings', 'newsletter_config')"
v-if="can('create', 'configuration', 'newsletter_config')"
class="!p-0 !h-fit !w-fit"
title="zurücksetzen"
@click="resetForm"

View file

@ -6,7 +6,7 @@
<div @click="downloadBackup">
<ArrowDownTrayIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
<div v-if="can('admin', 'user', 'backup')" @click="openRestoreModal">
<div v-if="can('admin', 'management', 'backup')" @click="openRestoreModal">
<BarsArrowUpIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -4,18 +4,18 @@
<p>{{ role.role }} <small v-if="role.permissions.admin">(Admin)</small></p>
<div class="flex flex-row">
<RouterLink
v-if="can('admin', 'user', 'role')"
v-if="can('admin', 'management', 'role')"
:to="{ name: 'admin-user-role-permission', params: { id: role.id } }"
>
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<RouterLink
v-if="can('update', 'user', 'role')"
v-if="can('update', 'management', 'role')"
:to="{ name: 'admin-user-role-edit', params: { id: role.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'user', 'role')" @click="openDeleteModal">
<div v-if="can('delete', 'management', 'role')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -3,7 +3,7 @@
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
<p>{{ invite.firstname }} {{ invite.lastname }}</p>
<div class="flex flex-row">
<div v-if="can('delete', 'user', 'user')" @click="triggerDeleteInvite">
<div v-if="can('delete', 'management', 'user')" @click="triggerDeleteInvite">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -7,25 +7,25 @@
</p>
<div class="flex flex-row">
<RouterLink
v-if="can('admin', 'user', 'user')"
v-if="can('admin', 'management', 'user')"
:to="{ name: 'admin-user-user-roles', params: { id: user.id } }"
>
<UserGroupIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<RouterLink
v-if="can('admin', 'user', 'user')"
v-if="can('admin', 'management', 'user')"
:to="{ name: 'admin-user-user-permission', params: { id: user.id } }"
>
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<RouterLink
v-if="can('update', 'user', 'user')"
v-if="can('update', 'management', 'user')"
:to="{ name: 'admin-user-user-edit', params: { id: user.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div
v-if="can('delete', 'user', 'user')"
v-if="can('delete', 'management', 'user')"
:class="user.isOwner ? 'opacity-75 pointer-events-none' : ''"
@click="openDeleteModal"
>

View file

@ -3,22 +3,22 @@
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
<p>{{ webapi.title }} <small v-if="webapi.permissions.admin">(Admin)</small></p>
<div class="flex flex-row">
<div v-if="can('admin', 'user', 'webapi')" @click="openTokenViewModal">
<div v-if="can('admin', 'management', 'webapi')" @click="openTokenViewModal">
<FingerPrintIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
<RouterLink
v-if="can('admin', 'user', 'webapi')"
v-if="can('admin', 'management', 'webapi')"
:to="{ name: 'admin-user-webapi-permission', params: { id: webapi.id } }"
>
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<RouterLink
v-if="can('update', 'user', 'webapi')"
v-if="can('update', 'management', 'webapi')"
:to="{ name: 'admin-user-webapi-edit', params: { id: webapi.id } }"
>
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</RouterLink>
<div v-if="can('delete', 'user', 'webapi')" @click="openDeleteModal">
<div v-if="can('delete', 'management', 'webapi')" @click="openDeleteModal">
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
</div>
</div>

View file

@ -27,7 +27,7 @@
</div>
<div class="grow"></div>
<div
v-if="allowPredefinedSelect && can('read', 'settings', 'query_store')"
v-if="allowPredefinedSelect && can('read', 'configuration', 'query_store')"
class="flex flex-row gap-2 max-lg:w-full max-lg:order-10"
>
<select v-model="activeQueryId" class="max-h-[34px] !py-0">
@ -37,7 +37,7 @@
</option>
</select>
<div
v-if="can('create', 'settings', 'query_store')"
v-if="can('create', 'configuration', 'query_store')"
class="p-1 border border-gray-400 bg-gray-100 rounded-md"
title="Abfrage speichern"
@click="$emit('query:save')"