From e577eef3244835decae9155e8822f4cc09640e78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 12 Oct 2022 14:19:37 +0200 Subject: [PATCH 1/3] Ticket 1112: StoreTicket Labels presence check validation preventing regular user from creating tickets --- app/Http/Requests/StoreTicket.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/Http/Requests/StoreTicket.php b/app/Http/Requests/StoreTicket.php index 96b2ead..76c2966 100644 --- a/app/Http/Requests/StoreTicket.php +++ b/app/Http/Requests/StoreTicket.php @@ -97,15 +97,14 @@ class StoreTicket extends FormRequest 'file_ticket' => 'mimes:jpeg,jpg,png,pdf|max:2048', 'file_ticket2' => 'mimes:jpeg,jpg,png,pdf|max:2048', 'is_internal' => 'required|boolean', - 'labels' => [ - // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed - 'sometimes', 'array', function ($attribute, $value, $fail) use ($user) { + 'labels' => 'sometimes|array', + 'labels.*' => [ + 'required', 'exists:labels,id', function ($attribute, $value, $fail) use ($user) { if (!$user->can('assignLabels', Ticket::class)) { $fail(trans('Vous n\'êtes pas autorisé à modifier cette valeur')); } } - ], - 'labels.*' => 'required|exists:labels,id' + ] ]; } } From 96f2c98925a53e6943a76be9b884e424875c1836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Munsch?= Date: Wed, 12 Oct 2022 14:21:36 +0200 Subject: [PATCH 2/3] bump version 1.2.3 --- CHANGELOG.md | 3 +++ composer.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17abe1d..3f42ef5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 12.10.2022 -> 1.2.3 +- Hotfixed regular users could not create tickets anymore + ### 01.07.2022 -> 1.2.2 - Fixed CSP directives - Fixed multiples bugs diff --git a/composer.json b/composer.json index 338f720..b2aa4f7 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ldcweb/supportweb", - "version": "1.2.2", + "version": "1.2.3", "type": "project", "description": "The Laravel Framework.", "keywords": [ From e7118f7b3ff10bffb3e0ceebe6877d2e8c8ae9fd Mon Sep 17 00:00:00 2001 From: Olivier Legat Date: Wed, 12 Oct 2022 17:48:01 +0200 Subject: [PATCH 3/3] fix url to paginated sites and projects --- resources/ts/components/ScheduleComponent.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/resources/ts/components/ScheduleComponent.vue b/resources/ts/components/ScheduleComponent.vue index bdf56c6..be46413 100644 --- a/resources/ts/components/ScheduleComponent.vue +++ b/resources/ts/components/ScheduleComponent.vue @@ -729,7 +729,9 @@ export default defineComponent({ value: "", }, currentModale: Modale = { - id: this.schedules[userid][slotkey][day as any]["id"] ?? this.__("Nouveau"), + id: + this.schedules[userid][slotkey][day as any]["id"] ?? + this.__("Nouveau"), userid: userid, slot: slotkey, day: day, @@ -871,7 +873,11 @@ export default defineComponent({ if (search !== false && search !== null) { this.searchText = search; } - route += "?page=" + this.page; + if (route.indexOf("?") < 0) { + route += "?page=" + this.page; + } else { + route += "&page=" + this.page; + } route += "&s=" + this.searchText; this.loading = true; axios