-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an optional lock_id argument to storage methods #163
Conversation
673979f
to
c01842c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these messages also need a lock_id
:
- CreateContainer
- TouchFile
- RestoreFileVersion
- RestoreRecycleItem
they all might end up writing into a locked resource
We looked at those too:
|
4d00f64
to
0729f43
Compare
I ended up adding the |
@butonic not sure why I can't ask you to review again, anyway could you have another look? I'd go ahead and merge this as is, in case we can keep adding further |
15124ec
to
7cc3fb0
Compare
7cc3fb0
to
b04cb4c
Compare
b04cb4c
to
223637d
Compare
Should we also enforce it for |
Can we also rename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For RestoreFileVersion
and RestoreRecycleItem
, we should specify that the lock is for the restore path
As discussed, Otherwise, I expanded the spec for |
As a matter of fact locking a directory was not taken into account so far. I think we should put a comment that although |
Follow up of #162: the storage methods that modify a resource now have an optional
lock_id
argument, such that storage provider implementations can enforce the lock validation.In addition, also the
InitiateDownloadRequest
has this extra argument, in order to honor exclusive locks. The assumption then is that stat and metadata read operations are always allowed (when access rights are met), such that e.g. the web UI can show users that "File important_stuff.txt is locked in exclusive mode by user bob".