-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 file action to explicitly lock a file #37460
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
bc97106
to
a4cf0df
Compare
5f5b193
to
a589c78
Compare
Codecov Report
@@ Coverage Diff @@
## master #37460 +/- ##
============================================
- Coverage 64.67% 64.66% -0.02%
- Complexity 19339 19343 +4
============================================
Files 1279 1279
Lines 75569 75600 +31
Branches 1331 1333 +2
============================================
+ Hits 48876 48885 +9
- Misses 26301 26323 +22
Partials 392 392
Continue to review full report at Codecov.
|
Questions:
|
in case a file is locked there will be no 'Lock file' action. Unlock is on the lock side bar
something for product mgmt @pmaier1 |
missing code coverage can be ignored.... ready for review and merge from my pov |
maybe a stupid question, but what/where is this side bar - reason see below. Just seen that this is user-doc relevant as it is a new item in the action list |
apps/files/js/filelockplugin.js
Outdated
fileList.fileActions.registerAction({ | ||
name: 'lock', | ||
mime: 'all', | ||
displayName: t('extract', 'Lock file'), |
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.
Is extract
intended?
this.render(); | ||
if (fileInfo) { | ||
const self = this; | ||
this.model.on('change', function(data) { |
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 have concerns about this...
What if the original this.model
had more events? Shouldn't we configure the same on the new model? This could also apply if the original "change" event is modified or simply does another thing.
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.
While testing I never received an event from the old model, which seems reasonable since it is no longer being used.
Nevertheless what will happen in the worstcase: the tab will render again ... 🤷
a589c78
to
bde1f1b
Compare
@micbar ready to be finally reviewed and merged .... for 10.5 maybe? no idea ... |
@DeepDiver1975 please add a changelog |
already in there ... |
Sorry, I missed it. |
BE - Make sure href to the lockroot includes the base uri.
bde1f1b
to
a75abb1
Compare
Description
A new file action to lock a file/folder will be added with this PR.
Related Issue
https://github.com/owncloud/enterprise/issues/3131
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: