37 lines
1.4 KiB
PHP
37 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Support;
|
|
|
|
use Illuminate\Contracts\Validation\ValidationRule;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class SupportGuestPolicyRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
/**
|
|
* @return array<string, ValidationRule|array<mixed>|string>
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'guest_downloads_enabled' => ['sometimes', 'boolean'],
|
|
'guest_sharing_enabled' => ['sometimes', 'boolean'],
|
|
'guest_upload_visibility' => ['sometimes', 'string'],
|
|
'per_device_upload_limit' => ['sometimes', 'integer', 'min:0'],
|
|
'join_token_failure_limit' => ['sometimes', 'integer', 'min:1'],
|
|
'join_token_failure_decay_minutes' => ['sometimes', 'integer', 'min:1'],
|
|
'join_token_access_limit' => ['sometimes', 'integer', 'min:0'],
|
|
'join_token_access_decay_minutes' => ['sometimes', 'integer', 'min:1'],
|
|
'join_token_download_limit' => ['sometimes', 'integer', 'min:0'],
|
|
'join_token_download_decay_minutes' => ['sometimes', 'integer', 'min:1'],
|
|
'join_token_ttl_hours' => ['sometimes', 'integer', 'min:0'],
|
|
'share_link_ttl_hours' => ['sometimes', 'integer', 'min:1'],
|
|
'guest_notification_ttl_hours' => ['nullable', 'integer', 'min:1'],
|
|
];
|
|
}
|
|
}
|