-
-
Notifications
You must be signed in to change notification settings - Fork 4.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 support for sending the password for a link share by Nextcloud Talk #11875
Add support for sending the password for a link share by Nextcloud Talk #11875
Conversation
933efa0
to
b4a5b7b
Compare
b4a5b7b
to
9e5440f
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.
Code looks good. And yay for tests
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.
🐘
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.
🐘 🐘
9e5440f
to
aa6fc9e
Compare
CI failure due to the newly added "hide_download" setting ;) |
aa6fc9e
to
5edc746
Compare
"Someone" forgot to run the PHP tests before pushing... :-P Fixed now, and as an extra I also added some missing (minor) tests for notes and hide download ;-) |
CI failure is a segfault in the memcache tests -> ignore it. |
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.
Code looks good 👍
I will wait with the merge of this after I merged #11844 |
The update share tests only checked that the share returned by "update()" had the expected values. However, as "update()" returns the same share that was given as a parameter the tests were not really verifying that the values were updated in the database. In a similar way, the test that checked that a password was removed did not set a password first, so even if the database returned null it could be simply returning the default value for the share; a password must be set first to ensure that it is removed. Besides that, a typo was fixed too that made the checks on the original share instead of on the one returned by "update()"; right now it is the same share, so the change makes no difference, but it is how the check should be done anyway. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
5edc746
to
86ad85c
Compare
@danxuliu The failing acceptance tests in here are the ones you mentioned that they also fail on master, right? |
When Talk is enabled the menu for link shares now shows a checkbox to protect the password by Talk (that is, to show the "Request password by Talk" UI in the authentication page for the link share). Although in e-mail shares protecting the share with a password and protecting the password by Talk are mutually exclusive actions (as when the password is set it is sent to the sharee, so it must be set again when protecting it by Talk to be able to verify the identity of the sharee), in the case of link shares protecting the password by Talk is an additional step to protecting the share with a password (as just setting the password does not disclose it to anyone). As such, the checkbox is shown only when there is a password set for the link share (even if the field itself for the password is not shown, like when they are enforced in the settings). Note that the icon set for the field, "icon-passwordtalk", does not currently exist; it is the same used for e-mail shares, and it is needed simply to get the right padding in the menu. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
93feac7
to
f57b07e
Compare
I have fixed the rendering by making the view to render again only when the password changes; it is not optimal, but at least it does not render again the whole view whenever a link share changed (and thus respects the changes made in #11844 ;-) ).
Yes, fixed in #12215 |
Especially considering this added yet another entry to the menu, I would really love your feedback on #12178 ;) |
Requires nextcloud/spreed#1273
Sending the password by Nextcloud Talk for a link share behaves slightly different than when doing it for an e-mail share. When an e-mail share is protected with a password an e-mail is sent with the password. Due to this, when the password is protected by Talk a new password must be always set; otherwise the recipient would already have the password, and thus she would not need to request it to the sharer and protecting it by Talk would be pointless.
However, in the case of link shares, just setting the password does not disclose it to anyone; the sharer must explicitly send it to someone to be known. Therefore, when protecting the password of a link share by Talk it is not mandatory to set a different password than the one set before; protecting the password by Talk in this case is an additional step to protecting the share with a password. Due to this the checkbox to protect the password by Talk is shown only when there is a password set for the link share.
Reviewers: Although the Talk counterpart is still in development state the server part is ready for review and can be merged now even if the Talk part is not ready yet; the missing parts in Talk are just better naming of rooms and a more useful text in the notifications, but besides that it just works (or, at least, it should :-) ).