Add passwordProtected flag to OCShares#149
Merged
AndyScherzinger merged 3 commits intomasterfrom Jun 12, 2018
Merged
Conversation
3 tasks
| mUserId = source.readLong(); | ||
| mRemoteId = source.readLong(); | ||
| mShareLink = source.readString(); | ||
| mIsPasswordProtected = source.readInt() == 0; |
Member
There was a problem hiding this comment.
We are writing a 1 if mIsPasswortProtected is true in line 346, but compare with 0?
So if mIsPasswortProteced = true, then
on write: dest.writeInt(1).
on read: source.readInt() == 0 --> 1 == 0 --> false --> mIsPasswordProtected = false
Member
Member
Author
All good :) Fixed your comment :) -> 431cf90 |
Member
Author
|
@mario @tobiasKaminsky please review, this PR is needed by nextcloud/android#2671 @tobiasKaminsky well, please re-review since I fixed your comment :) |
Member
Author
|
AWAITING 2ND PEER REVIEW SINCE 8 DAYS // AWAITING RE-REVIEW SINCE 5 DAYS @mario @tobiasKaminsky please review, this PR is needed by nextcloud/android#2671 @tobiasKaminsky well, please re-review since I fixed your comment :) |
Contributor
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
At the moment the server supports setting a password for a share link and for an email share. The fact that a share is actually password protected isn't reflected in the OCShare object.
For links that has been fine since if shared-with is set is is password protected (even though this sounds strange...). This mechanism however won't work for email shares thus the client using the library should be able to parse/get/set this info and later store this fact to the database.