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

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2018-08-08 15:17:24 +0300
committerJoas Schilling <coding@schilljs.com>2018-08-08 15:17:40 +0300
commit135c82304f8135d90d67071b3b61c87e425dd8ff (patch)
treedc2d90c8d812ad8acd585c16375e072da25fa977
parentfbe0f569933db0ea64575b2ab3f1b7241b1edcaf (diff)
Revert "Open the call in a new tab for now"
This reverts commit 112c73b71cbc642937f8f2f2c9d903c014fd8f70.
-rw-r--r--appinfo/routes.php5
-rw-r--r--css/publicshareauth.scss9
-rw-r--r--js/publicshareauth.js12
-rw-r--r--lib/Controller/PageController.php48
4 files changed, 1 insertions, 73 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 98a76a92c..2422e13f0 100644
--- a/appinfo/routes.php
+++ b/appinfo/routes.php
@@ -28,11 +28,6 @@ return [
'url' => '/',
'verb' => 'GET',
],
- [
- 'name' => 'Page#shareAuth',
- 'url' => '/shareauth/{token}',
- 'verb' => 'GET',
- ],
],
'ocs' => [
/**
diff --git a/css/publicshareauth.scss b/css/publicshareauth.scss
index ef224f670..218e385be 100644
--- a/css/publicshareauth.scss
+++ b/css/publicshareauth.scss
@@ -21,15 +21,6 @@ input#request-password-button:disabled ~ .icon {
opacity: 0.5;
}
-/* Mimic the appearance of the log in button when a link is used. */
-.request-password-wrapper a {
- display: block;
- width: 269px;
- padding: 13px 10px;
- font-size: 20px;
- margin: 5px;
-}
-
/* Special layout to include the Talk sidebar */
diff --git a/js/publicshareauth.js b/js/publicshareauth.js
index 515605144..014806d94 100644
--- a/js/publicshareauth.js
+++ b/js/publicshareauth.js
@@ -28,8 +28,7 @@
init: function() {
var self = this;
- // this.setupRequestPasswordButton();
- this.setupCallButton();
+ this.setupRequestPasswordButton();
this.setupLayoutForTalkSidebar();
$('#request-password-button').click(function() {
@@ -45,15 +44,6 @@
});
},
- setupCallButton: function() {
- var url = OC.generateUrl('apps/spreed/shareauth/' + $('#sharingToken').val());
-
- $('main').append('<div id="submit-wrapper" class="request-password-wrapper">' +
- ' <a href="' + url + '" target="_blank" class="primary button">' + t('spreed', 'Request password') + '</a>' +
- ' <div class="icon icon-confirm-white"></div>' +
- '</div>');
- },
-
setupRequestPasswordButton: function() {
// "submit-wrapper" is used to mimic the login button and thus get
// automatic colouring of the confirm icon by the Theming app
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 469c82c57..96d13ff71 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -33,9 +33,7 @@ use OCA\Spreed\Room;
use OCA\Spreed\TalkSession;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
-use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\ContentSecurityPolicy;
-use OCP\AppFramework\Http\NotFoundResponse;
use OCP\AppFramework\Http\RedirectResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\AppFramework\Http\Template\PublicTemplateResponse;
@@ -186,52 +184,6 @@ class PageController extends Controller {
}
/**
- * @PublicPage
- * @NoCSRFRequired
- *
- * @param string $token
- * @return NotFoundResponse|RedirectResponse
- */
- public function shareAuth($token = ''): Response {
- try {
- $share = \OC::$server->getShareManager()->getShareByToken($token);
- } catch (\OCP\Share\Exceptions\ShareNotFound $e) {
- return new NotFoundResponse();
- }
-
- if (!$share->getSendPasswordByTalk()) {
- return new NotFoundResponse();
- }
-
- $sharerUser = \OC::$server->getUserManager()->get($share->getSharedBy());
-
- if (!$sharerUser instanceof \OCP\IUser) {
- return new NotFoundResponse();
- }
-
- // Create the room
- $room = $this->manager->createPublicRoom($share->getSharedWith(), 'share:password', $token);
- $room->addUsers([
- 'userId' => $sharerUser->getUID(),
- 'participantType' => Participant::OWNER,
- ]);
-
- // Notify the owner
- $notification = $this->notificationManager->createNotification();
- $notification
- ->setApp('spreed')
- ->setObject('room', $room->getToken())
- ->setUser($sharerUser->getUID())
- ->setSubject('share:password', [
- 'sharedWith' => $share->getSharedWith(),
- ])
- ->setDateTime(new \DateTime());
- $this->notificationManager->notify($notification);
-
- return new RedirectResponse($this->url->linkToRoute('spreed.Page.index', ['token' => $room->getToken()]));
- }
-
- /**
* @param string $token
* @param string $password
* @return TemplateResponse|RedirectResponse