feat(drive): impl policy photo + music policies

add `include_in_photo_index` and `include_in_music_index` policies
    both true for default personal drive

    photo is implemented
    music is not yet implemented
This commit is contained in:
Edouard Vanbelle
2026-07-01 21:54:29 +02:00
parent 20e5ef0ef2
commit 01ff7dab0b
14 changed files with 367 additions and 58 deletions
+9 -1
View File
@@ -256,10 +256,18 @@ pub trait DriveRepository: Send + Sync + 'static {
///
/// Caller is responsible for the `Manage` permission check; this
/// method does not re-verify.
///
/// `partial` is a raw JSON object carrying **only** the keys the
/// caller wants to change — the repo passes it verbatim to the
/// `policies || $partial` JSONB merge. Using the typed
/// `DrivePolicies` here would serialise every field (including
/// unset ones as `false`) and clobber other flags on the row;
/// keeping the merge on the raw `Value` preserves the
/// partial-update semantic the handler documents.
async fn update_policies(
&self,
drive_id: Uuid,
partial: &crate::domain::entities::drive::DrivePolicies,
partial: &serde_json::Value,
) -> Result<crate::domain::entities::drive::DrivePolicies, DriveRepositoryError>;
}