Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-12 15:52:36 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-07-24 15:04:22 +0300
commit96108ab8588aa63a242df4a435d26e4ea3aecfdf (patch)
tree534153e0713ea72a9e28d4c1bbb23e5c721659d0 /core/templates
parent7849630cef494096df1290f6d3b9d3eeed6ce5e6 (diff)
Add event to load additional scripts in the auth page for public shares
Before the public share authentication page is rendered now an event to load additional scripts is dispatched. Thanks to this any app can load its own scripts that, when run on the browser, adjust as needed the page generated by the server. Note, however, that during the handling of the event apps are only able to add scripts or styles to be loaded; they can not render arbitrary content on the page, or change how the content is rendered by the original template; all those changes have to be done by the scripts at run-time. This implies that the scripts of the apps can use only those parameters, like the token of the share, added to the page when it is generated by the "publicshareauth" template. Due to this, and given that the event is being introduced to be used by Talk to inject the UI needed to request the password for a share, the token of the share is now provided in the generated page, just like done in the public share page. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/publicshareauth.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/templates/publicshareauth.php b/core/templates/publicshareauth.php
index adcc2853f87..22e22622291 100644
--- a/core/templates/publicshareauth.php
+++ b/core/templates/publicshareauth.php
@@ -20,6 +20,7 @@
placeholder="<?php p($l->t('Password')); ?>" value=""
autocomplete="new-password" autocapitalize="off" autocorrect="off"
autofocus />
+ <input type="hidden" name="sharingToken" value="<?php p($_['share']->getToken()) ?>" id="sharingToken">
<input type="submit" id="password-submit"
class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
</p>