diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-10-15 17:09:46 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-11-02 13:30:18 +0100 |
commit | 376704e83413d093d596f1b9168daf24907189aa (patch) | |
tree | 0058f7763e7cdbd535400847843178655a54f97d /core/js/shareitemmodel.js | |
parent | adf80aa8b329cf08e3f21a1ed8f722ab066d868d (diff) | |
download | nextcloud-server-376704e83413d093d596f1b9168daf24907189aa.tar.gz nextcloud-server-376704e83413d093d596f1b9168daf24907189aa.zip |
Add "Password protect by Talk" to the menu of link shares
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>
Diffstat (limited to 'core/js/shareitemmodel.js')
-rw-r--r-- | core/js/shareitemmodel.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js index 1bbdb2448ab..f4ac03e1c18 100644 --- a/core/js/shareitemmodel.js +++ b/core/js/shareitemmodel.js @@ -19,6 +19,7 @@ * @property {string} token * @property {bool} hideDownload * @property {string|null} password + * @property {bool} sendPasswordByTalk * @property {number} permissions * @property {Date} expiration * @property {number} stime share time @@ -141,6 +142,7 @@ hideDownload: false, password: '', passwordChanged: false, + sendPasswordByTalk: false, permissions: OC.PERMISSION_READ, expireDate: this.configModel.getDefaultExpirationDateString(), shareType: OC.Share.SHARE_TYPE_LINK @@ -873,7 +875,8 @@ // hide_download is returned as an int, so force it // to a boolean hideDownload: !!share.hide_download, - password: share.share_with + password: share.share_with, + sendPasswordByTalk: share.send_password_by_talk })); return share; |