From bdbf3f0ca7f07d56f56bca4cacec4281f9b57c0d Mon Sep 17 00:00:00 2001 From: Alex Ioannidis Date: Tue, 21 May 2024 13:21:20 +0200 Subject: [PATCH] customize: update files locking function signature --- docs/customize/files-and-versioning.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/customize/files-and-versioning.md b/docs/customize/files-and-versioning.md index 50893c67..6a0afde3 100644 --- a/docs/customize/files-and-versioning.md +++ b/docs/customize/files-and-versioning.md @@ -18,10 +18,10 @@ In some cases repository manager might need to chose to disable the file version - Performance: Maintaining version history can impact system performance, especially when handling a large number of files and records. Disabling versioning can help improve system responsiveness and speed, particularly in resource-constrained environments. -In order to provide custom rules of unlocking the file edition without creating a new version, you need to implement a callable which evaluates the conditions to a return a bool variable: +In order to provide custom rules for unlocking the file edition without creating a new version, you need to implement a callable which evaluates the conditions to return a bool value: ```python -def lock_edit_record_published_files(record): +def lock_edit_record_published_files(service, identity, record=None, draft=None): """Custom conditions for file bucket lock.""" if record: is_external_doi = record.get("pids", {}).get("doi", {}).get("provider") == "external" @@ -32,4 +32,4 @@ def lock_edit_record_published_files(record): RDM_LOCK_EDIT_PUBLISHED_FILES = lock_edit_record_published_files """Lock editing already published files (enforce record versioning).""" -``` \ No newline at end of file +```