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>
Hiding the download does not depend on other settings and it does not
affect other settings either (for example, it would be possible to hide
the downloads yet make the share editable), so a simple checkbox was
added to the menu. However, note that this option is only available for
files, but not for folders.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
humanFileSize: add test with locale
humanFileSize: use canonical locale
humanFileSize: skip test w/o toLocaleString support
humanFileSize: stub getCanonicalLocale
OC.getCanonicalLocale: cover undefined case
humanFileSize: fix getCanonicalLocale stub
Signed-off-by: Claas Augner <git@caugner.de>
This fixes errors from LGTM like the following one:
Variable i is used like a local variable,
but is missing a declaration.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes some recommendations from LGTM:
Avoid automated semicolon insertion (90% of all statements
in the enclosing function have an explicit semicolon).
Signed-off-by: Stefan Weil <sw@weilnetz.de>
No more weird eval to construct a plural function.
We just use the plural function from symfony.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
When "session_lifetime" can not be converted to a number the interval
becomes a NaN due to dividing it by 2. This NaN was "dragged" over all
the other mathematical operations and caused the csrftoken to be got
again and again due to an infinite loop with no pauses in "setInterval".
Now, the interval is set to the default value instead if the
"session_lifetime" can not be converted to a number.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The check is based on the HTTP status returned by the URL, and different
URLs may return different status (for example, DAV returns 207, while
a service like WebFinger would return 200), so the expected status needs
to be set depending on the URL.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>