user()?->tokenCan('press-release-images:write') === true; } /** * Get the validation rules that apply to the request. * * KI-Kennzeichnung je Bild (Art. 50 KI-VO) ist im v1-Vertrag Pflicht; * Legacy-/service-Clients kennen das Feld nicht — dort greift der * Kompatibilitäts-Default „original" (Entscheidung 10.07.2026). * * @return array|string> */ public function rules(): array { $isLegacyServiceCall = str_starts_with((string) $this->route()?->getName(), 'legacy-service.'); return [ 'image' => ['required', 'image', 'mimes:jpg,jpeg,png,webp', 'max:8192'], 'ai_declaration' => [ Rule::requiredIf(! $isLegacyServiceCall), 'nullable', Rule::enum(AiImageDeclaration::class), ], 'title' => ['nullable', 'string', 'max:120'], 'description' => ['nullable', 'string', 'max:500'], 'copyright' => ['nullable', 'string', 'max:255'], 'is_preview' => ['nullable', 'boolean'], ]; } }