Skip to content
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

Support Files Download Limits #1631

Merged
merged 13 commits into from
Jan 21, 2025
Merged

Conversation

ZetaTom
Copy link
Contributor

@ZetaTom ZetaTom commented Jan 15, 2025

This pull request implements all operations required to interface with the files_downloadlimit server app which allows users to set limit of how many times a file may be downloaded from a public share.

The UI implementation will follow in a separate pull request.

See nextcloud/files-clients#54 for more information.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 5.04202% with 113 lines in your changes missing coverage. Please review.

Project coverage is 22.52%. Comparing base (fe2c9ff) to head (a69a0fd).
Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
...owncloud/android/lib/common/network/WebdavEntry.kt 6.06% 29 Missing and 2 partials ⚠️
...rces/files/GetFilesDownloadLimitRemoteOperation.kt 0.00% 26 Missing ⚠️
...rces/files/SetFilesDownloadLimitRemoteOperation.kt 0.00% 17 Missing ⚠️
...s/files/RemoveFilesDownloadLimitRemoteOperation.kt 0.00% 15 Missing ⚠️
...sources/status/GetCapabilitiesRemoteOperation.java 0.00% 8 Missing ⚠️
...ources/shares/GetSharesForFileRemoteOperation.java 0.00% 5 Missing ⚠️
...d/android/lib/resources/files/FileDownloadLimit.kt 0.00% 4 Missing ⚠️
...ud/android/lib/resources/files/model/RemoteFile.kt 0.00% 3 Missing ⚠️
...m/owncloud/android/lib/resources/shares/OCShare.kt 25.00% 3 Missing ⚠️
...cloud/android/lib/resources/status/OCCapability.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1631      +/-   ##
============================================
- Coverage     22.89%   22.52%   -0.37%     
- Complexity      617      619       +2     
============================================
  Files           215      219       +4     
  Lines          8177     8345     +168     
  Branches       1040     1090      +50     
============================================
+ Hits           1872     1880       +8     
- Misses         6124     6284     +160     
  Partials        181      181              
Files with missing lines Coverage Δ
...ncloud/android/lib/common/network/WebdavUtils.java 88.88% <100.00%> (+0.08%) ⬆️
.../android/lib/resources/status/OwnCloudVersion.java 60.00% <100.00%> (+0.62%) ⬆️
...cloud/android/lib/resources/status/OCCapability.kt 92.95% <50.00%> (-1.25%) ⬇️
...ud/android/lib/resources/files/model/RemoteFile.kt 0.00% <0.00%> (ø)
...m/owncloud/android/lib/resources/shares/OCShare.kt 41.08% <25.00%> (-0.52%) ⬇️
...d/android/lib/resources/files/FileDownloadLimit.kt 0.00% <0.00%> (ø)
...ources/shares/GetSharesForFileRemoteOperation.java 0.00% <0.00%> (ø)
...sources/status/GetCapabilitiesRemoteOperation.java 0.00% <0.00%> (ø)
...s/files/RemoveFilesDownloadLimitRemoteOperation.kt 0.00% <0.00%> (ø)
...rces/files/SetFilesDownloadLimitRemoteOperation.kt 0.00% <0.00%> (ø)
... and 2 more

... and 3 files with indirect coverage changes

@ZetaTom ZetaTom force-pushed the feature/file_download_limits branch from 30252d7 to a69a0fd Compare January 15, 2025 13:08
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
- remove redundant exception handling

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
@ZetaTom ZetaTom force-pushed the feature/file_download_limits branch from a69a0fd to 8e27e4c Compare January 20, 2025 14:46
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
tobiasKaminsky and others added 2 commits January 20, 2025 17:48
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
@nextcloud nextcloud deleted a comment from github-actions bot Jan 21, 2025
@nextcloud nextcloud deleted a comment from github-actions bot Jan 21, 2025
@nextcloud nextcloud deleted a comment from github-actions bot Jan 21, 2025
Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
@ZetaTom ZetaTom force-pushed the feature/file_download_limits branch from 688bdc1 to 420bc3e Compare January 21, 2025 08:54
Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

Copy link
Member

@tobiasKaminsky tobiasKaminsky left a comment

Choose a reason for hiding this comment

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

Use NextcloudVersion

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
@nextcloud-android-bot
Copy link
Collaborator

Copy link
Contributor

SpotBugs

CategoryBaseNew
Bad practice3535
Correctness3434
Dodgy code2626
Internationalization66
Malicious code vulnerability4949
Multithreaded correctness33
Performance88
Total161161

@nextcloud-android-bot
Copy link
Collaborator

@tobiasKaminsky tobiasKaminsky merged commit 1a8e497 into master Jan 21, 2025
16 of 17 checks passed
@tobiasKaminsky tobiasKaminsky deleted the feature/file_download_limits branch January 21, 2025 09:29
@AndyScherzinger AndyScherzinger added this to the NC Android lib 2.20.0 milestone Jan 21, 2025
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.

4 participants