permission type rename
This commit is contained in:
parent
8033038c2e
commit
9d96a3f921
36 changed files with 128 additions and 108 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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')"
|
||||
|
|
|
@ -301,21 +301,21 @@ const router = createRouter({
|
|||
path: "settings",
|
||||
name: "admin-settings",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings" },
|
||||
meta: { type: "read", section: "configuration" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-default",
|
||||
component: () => import("@/views/admin/ViewSelect.vue"),
|
||||
meta: { type: "read", section: "settings" },
|
||||
meta: { type: "read", section: "configuration" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "qualification",
|
||||
name: "admin-settings-qualification-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "qualification" },
|
||||
meta: { type: "read", section: "configuration", module: "qualification" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -327,7 +327,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-qualification-edit",
|
||||
component: () => import("@/views/admin/configuration/qualification/QualificationEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "qualification" },
|
||||
meta: { type: "update", section: "configuration", module: "qualification" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -337,7 +337,7 @@ const router = createRouter({
|
|||
path: "award",
|
||||
name: "admin-settings-award-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "award" },
|
||||
meta: { type: "read", section: "configuration", module: "award" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-award-edit",
|
||||
component: () => import("@/views/admin/configuration/award/AwardEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "award" },
|
||||
meta: { type: "update", section: "configuration", module: "award" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -359,21 +359,21 @@ const router = createRouter({
|
|||
path: "executive-position",
|
||||
name: "admin-settings-executive_position-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "executive_position" },
|
||||
meta: { type: "read", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-executive_position",
|
||||
component: () => import("@/views/admin/configuration/executivePosition/ExecutivePosition.vue"),
|
||||
meta: { type: "read", section: "settings", module: "executive_position" },
|
||||
meta: { type: "read", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-executive_position-edit",
|
||||
component: () => import("@/views/admin/configuration/executivePosition/ExecutivePositionEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "executive_position" },
|
||||
meta: { type: "update", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -383,7 +383,7 @@ const router = createRouter({
|
|||
path: "communication-type",
|
||||
name: "admin-settings-communication_type-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "communication_type" },
|
||||
meta: { type: "read", section: "configuration", module: "communication_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-communication_type-edit",
|
||||
component: () => import("@/views/admin/configuration/communicationType/CommunicationTypeEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "communication_type" },
|
||||
meta: { type: "update", section: "configuration", module: "communication_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -405,7 +405,7 @@ const router = createRouter({
|
|||
path: "status",
|
||||
name: "admin-settings-membership_status-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "membership_status" },
|
||||
meta: { type: "read", section: "configuration", module: "membership_status" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -417,7 +417,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-membership_status-edit",
|
||||
component: () => import("@/views/admin/configuration/membershipStatus/MembershipStatusEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "membership_status" },
|
||||
meta: { type: "update", section: "configuration", module: "membership_status" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -427,7 +427,7 @@ const router = createRouter({
|
|||
path: "salutation",
|
||||
name: "admin-settings-salutation-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "salutation" },
|
||||
meta: { type: "read", section: "configuration", module: "salutation" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -439,7 +439,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-salutation-edit",
|
||||
component: () => import("@/views/admin/configuration/salutation/SalutationEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "salutation" },
|
||||
meta: { type: "update", section: "configuration", module: "salutation" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -449,7 +449,7 @@ const router = createRouter({
|
|||
path: "calendar-type",
|
||||
name: "admin-settings-calendar_type-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "calendar_type" },
|
||||
meta: { type: "read", section: "configuration", module: "calendar_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -461,7 +461,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-calendar_type-edit",
|
||||
component: () => import("@/views/admin/configuration/calendarType/CalendarTypeEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "calendar_type" },
|
||||
meta: { type: "update", section: "configuration", module: "calendar_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -471,14 +471,14 @@ const router = createRouter({
|
|||
path: "query-store",
|
||||
name: "admin-settings-query_store",
|
||||
component: () => import("@/views/admin/configuration/queryStore/QueryStore.vue"),
|
||||
meta: { type: "read", section: "settings", module: "query_store" },
|
||||
meta: { type: "read", section: "configuration", module: "query_store" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "template",
|
||||
name: "admin-settings-template-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "template" },
|
||||
meta: { type: "read", section: "configuration", module: "template" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -496,7 +496,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-settings-template-edit",
|
||||
component: () => import("@/views/admin/configuration/template/TemplateEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "template" },
|
||||
meta: { type: "update", section: "configuration", module: "template" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -506,14 +506,14 @@ const router = createRouter({
|
|||
path: "template-usage",
|
||||
name: "admin-settings-template_usage",
|
||||
component: () => import("@/views/admin/configuration/templateUsage/TemplateUsage.vue"),
|
||||
meta: { type: "read", section: "settings", module: "template_usage" },
|
||||
meta: { type: "read", section: "configuration", module: "template_usage" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "newsletter-config",
|
||||
name: "admin-settings-newsletter_config",
|
||||
component: () => import("@/views/admin/configuration/newsletterConfig/NewsletterConfig.vue"),
|
||||
meta: { type: "read", section: "settings", module: "newsletter_config" },
|
||||
meta: { type: "read", section: "configuration", module: "newsletter_config" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
],
|
||||
|
@ -522,21 +522,21 @@ const router = createRouter({
|
|||
path: "user",
|
||||
name: "admin-user",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user" },
|
||||
meta: { type: "read", section: "management" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-default",
|
||||
component: () => import("@/views/admin/ViewSelect.vue"),
|
||||
meta: { type: "read", section: "user" },
|
||||
meta: { type: "read", section: "management" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "user",
|
||||
name: "admin-user-user-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "user" },
|
||||
meta: { type: "read", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -553,7 +553,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-user-user-edit",
|
||||
component: () => import("@/views/admin/management/user/UserEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -561,7 +561,7 @@ const router = createRouter({
|
|||
path: ":id/permission",
|
||||
name: "admin-user-user-permission",
|
||||
component: () => import("@/views/admin/management/user/UserEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -569,7 +569,7 @@ const router = createRouter({
|
|||
path: ":id/roles",
|
||||
name: "admin-user-user-roles",
|
||||
component: () => import("@/views/admin/management/user/UserEditRoles.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -579,7 +579,7 @@ const router = createRouter({
|
|||
path: "role",
|
||||
name: "admin-user-role-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "role" },
|
||||
meta: { type: "read", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -591,7 +591,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-user-role-edit",
|
||||
component: () => import("@/views/admin/management/role/RoleEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "role" },
|
||||
meta: { type: "update", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -599,7 +599,7 @@ const router = createRouter({
|
|||
path: ":id/permission",
|
||||
name: "admin-user-role-permission",
|
||||
component: () => import("@/views/admin/management/role/RoleEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "role" },
|
||||
meta: { type: "update", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -609,7 +609,7 @@ const router = createRouter({
|
|||
path: "webapi",
|
||||
name: "admin-user-webapi-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "webapi" },
|
||||
meta: { type: "read", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -621,7 +621,7 @@ const router = createRouter({
|
|||
path: ":id/edit",
|
||||
name: "admin-user-webapi-edit",
|
||||
component: () => import("@/views/admin/management/webapi/WebapiEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
meta: { type: "update", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -629,7 +629,7 @@ const router = createRouter({
|
|||
path: ":id/permission",
|
||||
name: "admin-user-webapi-permission",
|
||||
component: () => import("@/views/admin/management/webapi/WebapiEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
meta: { type: "update", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -639,7 +639,7 @@ const router = createRouter({
|
|||
path: "backup",
|
||||
name: "admin-user-backup-route",
|
||||
component: () => import("@/views/admin/management/backup/BackupRouting.vue"),
|
||||
meta: { type: "read", section: "user", module: "backup" },
|
||||
meta: { type: "read", section: "management", module: "backup" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
|
@ -778,6 +778,7 @@ export default router;
|
|||
|
||||
declare module "vue-router" {
|
||||
interface RouteMeta {
|
||||
admin?: boolean;
|
||||
type?: PermissionType | "admin";
|
||||
section?: PermissionSection;
|
||||
module?: PermissionModule;
|
||||
|
|
|
@ -38,7 +38,7 @@ export const useQueryStoreStore = defineStore("queryStore", {
|
|||
const queryBuilderStore = useQueryBuilderStore();
|
||||
const modalStore = useModalStore();
|
||||
const abilityStore = useAbilityStore();
|
||||
if (queryBuilderStore.activeQueryId != undefined && abilityStore.can("update", "settings", "query_store")) {
|
||||
if (queryBuilderStore.activeQueryId != undefined && abilityStore.can("update", "configuration", "query_store")) {
|
||||
modalStore.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/queryStore/UpdateQueryStoreModal.vue"))
|
||||
|
|
|
@ -58,7 +58,7 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
} as topLevelNavigationModel,
|
||||
]
|
||||
: []),
|
||||
...(abilityStore.canSection("read", "settings")
|
||||
...(abilityStore.canSection("read", "configuration")
|
||||
? [
|
||||
{
|
||||
key: "settings",
|
||||
|
@ -67,7 +67,7 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
} as topLevelNavigationModel,
|
||||
]
|
||||
: []),
|
||||
...(abilityStore.canSection("read", "user")
|
||||
...(abilityStore.canSection("read", "management")
|
||||
? [
|
||||
{
|
||||
key: "user",
|
||||
|
@ -99,41 +99,45 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
mainTitle: "Einstellungen",
|
||||
main: [
|
||||
{ key: "divider1", title: "Mitgliederdaten" },
|
||||
...(abilityStore.can("read", "settings", "salutation") ? [{ key: "salutation", title: "Anrede" }] : []),
|
||||
...(abilityStore.can("read", "settings", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
|
||||
...(abilityStore.can("read", "settings", "communication_type")
|
||||
...(abilityStore.can("read", "configuration", "salutation")
|
||||
? [{ key: "salutation", title: "Anrede" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "configuration", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "communication_type")
|
||||
? [{ key: "communication_type", title: "Kommunikationsarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "membership_status")
|
||||
...(abilityStore.can("read", "configuration", "membership_status")
|
||||
? [{ key: "membership_status", title: "Mitgliedsstatus" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "qualification")
|
||||
...(abilityStore.can("read", "configuration", "qualification")
|
||||
? [{ key: "qualification", title: "Qualifikationen" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "executive_position")
|
||||
...(abilityStore.can("read", "configuration", "executive_position")
|
||||
? [{ key: "executive_position", title: "Vereinsämter" }]
|
||||
: []),
|
||||
{ key: "divider2", title: "Einstellungen" },
|
||||
...(abilityStore.can("read", "settings", "newsletter_config")
|
||||
...(abilityStore.can("read", "configuration", "newsletter_config")
|
||||
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "settings", "template_usage")
|
||||
...(abilityStore.can("read", "configuration", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "template_usage")
|
||||
? [{ key: "template_usage", title: "Template-Verwendung" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "calendar_type")
|
||||
...(abilityStore.can("read", "configuration", "calendar_type")
|
||||
? [{ key: "calendar_type", title: "Terminarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "query") ? [{ key: "query_store", title: "Query Store" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "query")
|
||||
? [{ key: "query_store", title: "Query Store" }]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
user: {
|
||||
mainTitle: "Benutzer",
|
||||
main: [
|
||||
...(abilityStore.can("read", "user", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
...(abilityStore.can("read", "user", "role") ? [{ key: "role", title: "Rollen" }] : []),
|
||||
...(abilityStore.can("read", "user", "webapi") ? [{ key: "webapi", title: "Webapi-Token" }] : []),
|
||||
...(abilityStore.can("read", "user", "backup") ? [{ key: "backup", title: "Backups" }] : []),
|
||||
...(abilityStore.can("read", "management", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
...(abilityStore.can("read", "management", "role") ? [{ key: "role", title: "Rollen" }] : []),
|
||||
...(abilityStore.can("read", "management", "webapi") ? [{ key: "webapi", title: "Webapi-Token" }] : []),
|
||||
...(abilityStore.can("read", "management", "backup") ? [{ key: "backup", title: "Backups" }] : []),
|
||||
...(abilityStore.isAdmin() ? [{ key: "version", title: "Version" }] : []),
|
||||
],
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export type PermissionSection = "club" | "settings" | "user";
|
||||
export type PermissionSection = "club" | "configuration" | "management";
|
||||
|
||||
export type PermissionModule =
|
||||
| "member"
|
||||
|
@ -43,7 +43,7 @@ export type SectionsAndModulesObject = {
|
|||
[section in PermissionSection]: Array<PermissionModule>;
|
||||
};
|
||||
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "settings", "user"];
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "configuration", "management"];
|
||||
export const permissionModules: Array<PermissionModule> = [
|
||||
"member",
|
||||
"calendar",
|
||||
|
@ -69,7 +69,7 @@ export const permissionModules: Array<PermissionModule> = [
|
|||
export const permissionTypes: Array<PermissionType> = ["read", "create", "update", "delete"];
|
||||
export const sectionsAndModules: SectionsAndModulesObject = {
|
||||
club: ["member", "calendar", "newsletter", "protocol", "query"],
|
||||
settings: [
|
||||
configuration: [
|
||||
"qualification",
|
||||
"award",
|
||||
"executive_position",
|
||||
|
@ -82,5 +82,5 @@ export const sectionsAndModules: SectionsAndModulesObject = {
|
|||
"template_usage",
|
||||
"newsletter_config",
|
||||
],
|
||||
user: ["user", "role", "webapi", "backup"],
|
||||
management: ["user", "role", "webapi", "backup"],
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ export default defineComponent({
|
|||
};
|
||||
},
|
||||
sortedPresence() {
|
||||
return this.presence.toSorted((a, b) => {
|
||||
return this.presence.slice().sort((a, b) => {
|
||||
const memberA = this.getMember(a.memberId);
|
||||
const memberB = this.getMember(b.memberId);
|
||||
return `${memberA?.lastname}, ${memberA?.firstname}`.localeCompare(
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<AwardListItem v-for="award in awards" :key="award.id" :award="award" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'award')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'configuration', 'award')" primary class="!w-fit" @click="openCreateModal">
|
||||
Auszeichnung erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,12 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'calendar_type')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button
|
||||
v-if="can('create', 'configuration', 'calendar_type')"
|
||||
primary
|
||||
class="!w-fit"
|
||||
@click="openCreateModal"
|
||||
>
|
||||
Termintyp erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button
|
||||
v-if="can('create', 'settings', 'communication_type')"
|
||||
v-if="can('create', 'configuration', 'communication_type')"
|
||||
primary
|
||||
class="!w-fit"
|
||||
@click="openCreateModal"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button
|
||||
v-if="can('create', 'settings', 'executive_position')"
|
||||
v-if="can('create', 'configuration', 'executive_position')"
|
||||
primary
|
||||
class="!w-fit"
|
||||
@click="openCreateModal"
|
||||
|
|
|
@ -11,7 +11,12 @@
|
|||
<MembershipStatusListItem v-for="status in membershipStatus" :key="status.id" :membershipStatus="status" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'membership_status')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button
|
||||
v-if="can('create', 'configuration', 'membership_status')"
|
||||
primary
|
||||
class="!w-fit"
|
||||
@click="openCreateModal"
|
||||
>
|
||||
Mitgliedsstatus erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,12 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'qualification')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button
|
||||
v-if="can('create', 'configuration', 'qualification')"
|
||||
primary
|
||||
class="!w-fit"
|
||||
@click="openCreateModal"
|
||||
>
|
||||
Qualifikation erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<RouterLink
|
||||
v-if="can('create', 'settings', 'query_store')"
|
||||
v-if="can('create', 'configuration', 'query_store')"
|
||||
:to="{ name: 'admin-club-query_builder' }"
|
||||
button
|
||||
primary
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<SalutationListItem v-for="salutation in salutations" :key="salutation.id" :salutation="salutation" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'salutation')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'configuration', 'salutation')" primary class="!w-fit" @click="openCreateModal">
|
||||
Anrede erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<TemplateListItem v-for="template in templates" :key="template.id" :template="template" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'settings', 'template')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'configuration', 'template')" primary class="!w-fit" @click="openCreateModal">
|
||||
Template erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<BackupListItem v-for="backup in backups" :key="backup" :backup="backup" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'user', 'backup')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'management', 'backup')" primary class="!w-fit" @click="openCreateModal">
|
||||
Backup erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<BackupListItem v-for="backup in backups" :key="backup" :backup="backup" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'user', 'backup')" primary class="!w-fit" @click="openUploadModal">
|
||||
<button v-if="can('create', 'management', 'backup')" primary class="!w-fit" @click="openUploadModal">
|
||||
Backup hochladen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<RoleListItem v-for="role in roles" :key="role.id" :role="role" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'user', 'role')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'management', 'role')" primary class="!w-fit" @click="openCreateModal">
|
||||
Rolle erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<UserListItem v-for="user in users" :key="user.id" :user="user" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'user', 'user')" primary class="!w-fit" @click="inviteUser">
|
||||
<button v-if="can('create', 'management', 'user')" primary class="!w-fit" @click="inviteUser">
|
||||
Nutzer einladen
|
||||
</button>
|
||||
<RouterLink button primary-outline :to="{ name: 'admin-user-user-invites' }" class="!w-fit">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<WebapiListItem v-for="webapi in webapis" :key="webapi.id" :webapi="webapi" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-4">
|
||||
<button v-if="can('create', 'user', 'webapi')" primary class="!w-fit" @click="openCreateModal">
|
||||
<button v-if="can('create', 'management', 'webapi')" primary class="!w-fit" @click="openCreateModal">
|
||||
Webapi-Token erstellen
|
||||
</button>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue