|
20 | 20 | */ |
21 | 21 | class ConfigLexicon implements IConfigLexicon { |
22 | 22 | public const UNIFIED_SEARCH_MIN_SEARCH_LENGTH = 'unified_search_min_search_length'; |
| 23 | + public const UNIFIED_SEARCH_MAX_RESULTS_PER_REQUEST = 'unified_search_max_results_per_request'; |
23 | 24 |
|
24 | 25 | public function getStrictness(): ConfigLexiconStrictness { |
25 | 26 | return ConfigLexiconStrictness::IGNORE; |
26 | 27 | } |
27 | 28 |
|
28 | 29 | public function getAppConfigs(): array { |
29 | 30 | return [ |
| 31 | +<<<<<<< HEAD |
30 | 32 | new ConfigLexiconEntry(self::UNIFIED_SEARCH_MIN_SEARCH_LENGTH, ValueType::INT, 1, 'Minimum search length to trigger the request', lazy: false), |
| 33 | +======= |
| 34 | + new Entry( |
| 35 | + key: self::SHAREAPI_ALLOW_FEDERATION_ON_PUBLIC_SHARES, |
| 36 | + type: ValueType::BOOL, |
| 37 | + defaultRaw: true, |
| 38 | + definition: 'adds share permission to public shares to allow adding them to your Nextcloud (federation)', |
| 39 | + lazy: true, |
| 40 | + ), |
| 41 | + new Entry( |
| 42 | + key: self::SHARE_CUSTOM_TOKEN, |
| 43 | + type: ValueType::BOOL, |
| 44 | + defaultRaw: fn (Preset $p): bool => match ($p) { |
| 45 | + Preset::FAMILY, Preset::PRIVATE => true, |
| 46 | + default => false, |
| 47 | + }, |
| 48 | + definition: 'Allow users to customize share URL', |
| 49 | + lazy: true, |
| 50 | + note: 'Shares with guessable tokens may be accessed easily. Shares with custom tokens will continue to be accessible after this setting has been disabled.', |
| 51 | + ), |
| 52 | + new Entry(self::SHARE_LINK_PASSWORD_DEFAULT, ValueType::BOOL, false, 'Ask for a password when sharing document by default'), |
| 53 | + new Entry( |
| 54 | + key: self::SHARE_LINK_PASSWORD_ENFORCED, |
| 55 | + type: ValueType::BOOL, |
| 56 | + defaultRaw: fn (Preset $p): bool => match ($p) { |
| 57 | + Preset::SCHOOL, Preset::UNIVERSITY, Preset::SHARED, Preset::SMALL, Preset::MEDIUM, Preset::LARGE => true, |
| 58 | + default => false, |
| 59 | + }, |
| 60 | + definition: 'Enforce password protection for shared documents' |
| 61 | + ), |
| 62 | + new Entry( |
| 63 | + key: self::SHARE_LINK_EXPIRE_DATE_DEFAULT, |
| 64 | + type: ValueType::BOOL, |
| 65 | + defaultRaw: fn (Preset $p): bool => match ($p) { |
| 66 | + Preset::SHARED, Preset::SMALL, Preset::MEDIUM, Preset::LARGE => true, |
| 67 | + default => false, |
| 68 | + }, |
| 69 | + definition: 'Default expiration date for shares via link or mail' |
| 70 | + ), |
| 71 | + new Entry( |
| 72 | + key: self::SHARE_LINK_EXPIRE_DATE_ENFORCED, |
| 73 | + type: ValueType::BOOL, |
| 74 | + defaultRaw: fn (Preset $p): bool => match ($p) { |
| 75 | + Preset::SHARED, Preset::SMALL, Preset::MEDIUM, Preset::LARGE => true, |
| 76 | + default => false, |
| 77 | + }, |
| 78 | + definition: 'Enforce expiration date for shares via link or mail' |
| 79 | + ), |
| 80 | + new Entry(self::LASTCRON_TIMESTAMP, ValueType::INT, 0, 'timestamp of last cron execution'), |
| 81 | + new Entry(self::OCM_DISCOVERY_ENABLED, ValueType::BOOL, true, 'enable/disable OCM', lazy: true), |
| 82 | + new Entry(self::OCM_INVITE_ACCEPT_DIALOG, ValueType::STRING, '', 'route to local invite accept dialog', lazy: true, note: 'set as empty string to disable feature'), |
| 83 | + new Entry(self::UNIFIED_SEARCH_MIN_SEARCH_LENGTH, ValueType::INT, 1, 'Minimum search length to trigger the request', lazy: false, rename: 'unified-search.min-search-length'), |
| 84 | + new Entry(self::UNIFIED_SEARCH_MAX_RESULTS_PER_REQUEST, ValueType::INT, 25, 'Maximum results returned per search request', lazy: false, rename: 'unified-search.max-results-per-request'), |
| 85 | +>>>>>>> 2053112887 (fix(unified-search): Remove hard-coded search result limit) |
31 | 86 | ]; |
32 | 87 | } |
33 | 88 |
|
|
0 commit comments