Merge branch 'hotfix' into develop

This commit is contained in:
Jérémy Munsch 2022-10-12 14:22:21 +02:00
commit a2f52ac27d
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
3 changed files with 8 additions and 6 deletions

View file

@ -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

View file

@ -100,15 +100,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'
]
];
}
}

View file

@ -1,6 +1,6 @@
{
"name": "ldcweb/supportweb",
"version": "1.2.2",
"version": "1.2.3",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [