2025-05-02 09:04:25 -04:00
< ? php
declare ( strict_types = 1 );
/**
* SPDX - FileCopyrightText : 2025 Nextcloud GmbH and Nextcloud contributors
* SPDX - License - Identifier : AGPL - 3.0 - or - later
*/
2025-05-03 05:34:21 -04:00
namespace OCA\Files_Sharing\Config ;
2025-05-02 09:04:25 -04:00
2025-07-16 09:46:45 -04:00
use OCP\Config\Lexicon\Entry ;
use OCP\Config\Lexicon\ILexicon ;
use OCP\Config\Lexicon\Strictness ;
use OCP\Config\ValueType ;
2025-05-02 09:04:25 -04:00
/**
* Config Lexicon for files_sharing .
*
* Please Add & Manage your Config Keys in that file and keep the Lexicon up to date !
*
2025-07-16 09:46:45 -04:00
* { @ see ILexicon }
2025-05-02 09:04:25 -04:00
*/
2025-07-16 09:46:45 -04:00
class ConfigLexicon implements ILexicon {
2025-05-02 09:04:25 -04:00
public const SHOW_FEDERATED_AS_INTERNAL = 'show_federated_shares_as_internal' ;
2025-06-24 08:16:22 -04:00
public const SHOW_FEDERATED_TO_TRUSTED_AS_INTERNAL = 'show_federated_shares_to_trusted_servers_as_internal' ;
2026-01-22 12:22:07 -05:00
public const EXCLUDE_RESHARE_FROM_EDIT = 'shareapi_exclude_reshare_from_edit' ;
2026-02-20 10:19:28 -05:00
public const UPDATE_CUTOFF_TIME = 'update_cutoff_time' ;
2026-02-12 09:42:16 -05:00
public const USER_NEEDS_SHARE_REFRESH = 'user_needs_share_refresh' ;
2025-05-02 09:04:25 -04:00
2026-04-28 13:35:30 -04:00
#[\Override]
2025-07-16 09:46:45 -04:00
public function getStrictness () : Strictness {
return Strictness :: IGNORE ;
2025-05-02 09:04:25 -04:00
}
2026-04-28 13:35:30 -04:00
#[\Override]
2025-05-02 09:04:25 -04:00
public function getAppConfigs () : array {
return [
2025-07-16 09:46:45 -04:00
new Entry ( self :: SHOW_FEDERATED_AS_INTERNAL , ValueType :: BOOL , false , 'shows federated shares as internal shares' , true ),
2025-06-24 08:16:22 -04:00
new Entry ( self :: SHOW_FEDERATED_TO_TRUSTED_AS_INTERNAL , ValueType :: BOOL , false , 'shows federated shares to trusted servers as internal shares' , true ),
2026-01-22 12:22:07 -05:00
new Entry ( self :: EXCLUDE_RESHARE_FROM_EDIT , ValueType :: BOOL , false , 'Exclude reshare permission from "Allow editing" bundled permissions' ),
2026-02-12 09:42:16 -05:00
2026-02-20 10:19:28 -05:00
new Entry ( self :: UPDATE_CUTOFF_TIME , ValueType :: FLOAT , 3.0 , 'Maximum time in second during which we update the share data immediately before switching to only marking the user' ),
2025-05-02 09:04:25 -04:00
];
}
2026-04-28 13:35:30 -04:00
#[\Override]
2025-05-02 09:04:25 -04:00
public function getUserConfigs () : array {
2026-02-12 09:42:16 -05:00
return [
2026-03-27 13:52:30 -04:00
new Entry ( self :: USER_NEEDS_SHARE_REFRESH , ValueType :: BOOL , true , 'whether a user needs to have the receiving share data refreshed for possible changes' ),
2026-02-12 09:42:16 -05:00
];
2025-05-02 09:04:25 -04:00
}
}