feat(drive): add policy forbid_public_links

This commit is contained in:
Edouard Vanbelle
2026-06-26 01:32:59 +02:00
parent cfd783cbd3
commit ddb131da8b
10 changed files with 568 additions and 3 deletions
+3 -1
View File
@@ -845,6 +845,7 @@ impl AppServiceFactory {
repos: &RepositoryServices,
db_pool: &Arc<PgPool>,
authorization: &Arc<crate::infrastructure::services::pg_acl_engine::PgAclEngine>,
drive_repo: &Arc<crate::infrastructure::repositories::pg::DrivePgRepository>,
) -> Option<Arc<ShareService>> {
if !self.config.features.enable_file_sharing {
tracing::info!("File sharing service is disabled in configuration");
@@ -867,6 +868,7 @@ impl AppServiceFactory {
share_repository,
repos.file_read_repository.clone(),
repos.folder_repository.clone(),
drive_repo.clone(),
password_hasher,
authorization.clone(),
));
@@ -1229,7 +1231,7 @@ impl AppServiceFactory {
);
// 5. Share service
let share_service = self.create_share_service(&repos, &pool, &authorization);
let share_service = self.create_share_service(&repos, &pool, &authorization, &drive_repo);
apps.share_service = share_service.clone();
let share_browse_service = share_service.as_ref().map(|s| {