Project

General

Profile

Actions

Bug #14860

closed

[API] Cannot modify collection when versioning is enabled and idle time is expired

Added by Lucas Di Pentima about 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
-
Start date:
02/19/2019
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
-
Release relationship:
Auto

Description

This happens when logged in with a non-admin account and working with on a collection with files.


Subtasks 1 (0 open1 closed)

Task #14867: Review 14860-fix-collection-versioningResolvedLucas Di Pentima02/19/2019

Actions
Actions #1

Updated by Lucas Di Pentima about 5 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Lucas Di Pentima about 5 years ago

After some more diagnosing, the issue seems to be happening when trying to save the snapshot collection on manage_versioning() callback at Collection class: The check_signatures() callback on the newly created snapshot fails because manifest_text has locators without signatures (fails at line 129)

Actions #3

Updated by Peter Amstutz about 5 years ago

Lucas Di Pentima wrote:

After some more diagnosing, the issue seems to be happening when trying to save the snapshot collection on manage_versioning() callback at Collection class: The check_signatures() callback on the newly created snapshot fails because manifest_text has locators without signatures (fails at line 129)

From chat:

The brute force solution would be to call signed_manifest_text to get manifest_text for the snapshot. Alternately you could wrap snapshot.save with act_as_system_user so long as that doesn't change any of the metadata fields (modified_by_user_uuid &c) or other behavior.

Actions #4

Updated by Lucas Di Pentima about 5 years ago

Updates at c1e1a7546 - branch 14860-fix-collection-versioning
Test run: https://ci.curoverse.com/job/developer-run-tests/1077/

Fixed the bug by assigning the signed manifest text to the snapshot being saved, as suggested by Peter. The act_as_system_user approach didn't worked because the modified_by_user_uuid field was being updated.

Actions #5

Updated by Peter Amstutz about 5 years ago

Lucas Di Pentima wrote:

Updates at c1e1a7546 - branch 14860-fix-collection-versioning
Test run: https://ci.curoverse.com/job/developer-run-tests/1077/

Fixed the bug by assigning the signed manifest text to the snapshot being saved, as suggested by Peter. The act_as_system_user approach didn't worked because the modified_by_user_uuid field was being updated.

This LGTM.

Actions #6

Updated by Peter Amstutz about 5 years ago

  • Release set to 23
Actions #7

Updated by Lucas Di Pentima about 5 years ago

  • Status changed from In Progress to Resolved
Actions #8

Updated by Tom Morris about 5 years ago

  • Release changed from 23 to 21
Actions

Also available in: Atom PDF