Skip to content

Add enable lock file action checkbox #37720

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

Merged
merged 3 commits into from
Jul 29, 2020

Conversation

phil-davis
Copy link
Contributor

@phil-davis phil-davis commented Jul 22, 2020

Description

Adds a checkbox to admin settings "Manual File Locking" to "Enable manual file locking on clients"

Checking the checkbox does the same as:

occ config:app:set files enable_lock_file_action --value yes

Unchecking does the same as:

occ config:app:set files enable_lock_file_action --value no

Screenshot_2020-07-22 Settings - ownCloud

Note: the 3rd commit adjusts the checkbox description so that it says "Enable manual file locking on clients".

Related Issue

This is a follow-on enhancement from all the file locking additions.

Also related to the discussion in #37620 about the meaning/interpretation of this setting. Any client that wants to support manual file locking can check this when deciding whether to give the user options for locking files. (A separate PR proposes to expose this setting in the capabilities API endpoint)

How Has This Been Tested?

Manually check the new checkbox, the browse to the Files page and confirm that the "Lock file" action is available for a file.

Manually uncheck the new checkbox, the browse to the Files page and confirm that the "Lock file" action is not available for a file.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:
  • Changelog item, see TEMPLATE

@phil-davis
Copy link
Contributor Author

This moves PR #37702 over to master branch. I cherry-picked various commits from release-10.5.0 because they are needed before this checkbox is added, but are not in master yet.

@codecov
Copy link

codecov bot commented Jul 22, 2020

Codecov Report

Merging #37720 into master will decrease coverage by 0.00%.
The diff coverage is 33.33%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #37720      +/-   ##
============================================
- Coverage     64.71%   64.71%   -0.01%     
  Complexity    19386    19386              
============================================
  Files          1283     1283              
  Lines         75732    75734       +2     
  Branches       1333     1333              
============================================
+ Hits          49009    49010       +1     
- Misses        26331    26332       +1     
  Partials        392      392              
Flag Coverage Δ Complexity Δ
#javascript 54.03% <ø> (ø) 0.00 <ø> (ø)
#phpunit 65.89% <33.33%> (-0.01%) 19386.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
apps/files/lib/App.php 20.00% <0.00%> (ø) 3.00 <0.00> (ø)
...tings/templates/panels/admin/persistentlocking.php 66.66% <0.00%> (-33.34%) 0.00 <0.00> (ø)
settings/Panels/Admin/PersistentLocking.php 100.00% <100.00%> (ø) 4.00 <0.00> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9fd1660...232f3d6. Read the comment docs.

@phil-davis
Copy link
Contributor Author

phil-davis commented Jul 23, 2020

@micbar who should review this?
(and who can give me hints how the codecov can be improved)

@phil-davis phil-davis force-pushed the enable_lock_file_action-checkbox branch from 243455e to 4efa7cb Compare July 28, 2020 08:57
@phil-davis phil-davis force-pushed the enable_lock_file_action-checkbox branch from 4efa7cb to c20449c Compare July 29, 2020 09:02
@phil-davis phil-davis changed the title Enable lock file action checkbox Add enable lock file action checkbox Jul 29, 2020
@phil-davis phil-davis force-pushed the enable_lock_file_action-checkbox branch from c20449c to b8781a0 Compare July 29, 2020 10:16
Copy link
Contributor

@pmaier1 pmaier1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from my side

@phil-davis phil-davis force-pushed the enable_lock_file_action-checkbox branch from 0a2b83e to 232f3d6 Compare July 29, 2020 12:06
@phil-davis
Copy link
Contributor Author

What happens about code coverage?
These are changes to template panels... Are there unit tests to enhance?

@phil-davis phil-davis merged commit 368cd0a into master Jul 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the enable_lock_file_action-checkbox branch July 29, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants