-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a "Request password" button to the public share authentication p…
…age for shares of type TYPE_EMAIL, when the "video verification" checkbox isn't checked. This to support sending temporary passwords to recipients for non-anonymous shares (TYPE_EMAIL shares). See #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Implements the "Request password" functionality in AuthPublicShareController.php Users accessing non-anonymous public shares can now request a temporary password themselves. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Creates a migration step for the files_sharing app to add the 'password_expiration_time' attribute to the oc_shares table. This is needed to support the temporary password feature. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Hides the password input field for shares shared with an email recipient and whose 'video verification' checkbox isn't checked. This supports the 'temporary password for email shares' feature, and this commit relates to #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Fixes a typo in a comment in apps/files_sharing/src/components/SharingEntryLink.vue Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> When updating a share of type EMAIL, only send the password to the recipient and set a password expiration time when the password has requested explicitly (either via a Talk session or by the user having followed the temporary password self- provisioning process). This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Creates a new background job to reset expired share temporary passwords. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Respect password policies (if any) when generating a temporary password. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Moves the newly created validateIdentity function away from the IManager interface and rather implement it in ShareController, so as to avoid the need for creating a new version of the IManager interface. Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Makes share temporary passwords' expiration time configurable via a system value. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Makes sure password hasn't expired when verifying a share's password. This also deletes the ResetExpiredPasswordsJob.php as it is not needed anymore. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Refactors the publicshareauth template to have the Enter key working in the email input field and add a 'Back' button. This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Fixes "Migration step 'OCA\Files_Sharing\Migration\Version24000Date20220208195521' is unknown." (by running build/autoloadchecker.sh) This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Adds an option to the "Create a new Share" OCS Share API to allow not sending the share password by email. Rationale: With the introduction of temporary share passwords, it's not so much usefull to send the password to the guest at share creation since she may request it later anyway. Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Adds a system config value to allow permanent share passwords This commit is part of #31005 Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> fixes DefaultShareProvider class is not compatible with IShareProvider Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Fixes FederatedShareProvider class is not compatible with IShareProvider Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Reverts the addition of a 'sendPassword' parameter to the ShareAPIController::create() method. The behaviour is now: If the password is a temporary one, do not send it to the guest, else send it. Signed-off-by: Cyrille Bollu <cyrpub@bollu.be> Updates ShareByMailProviderTest tests to take into account the fact that temporary passwords shall not be sent by email anymore upon share creation. Signed-off-by: Cyrille Bollu <cyrpub@bollu.be>
- Loading branch information
Showing
26 changed files
with
11,701 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
apps/files_sharing/lib/Migration/Version24000Date20220208195521.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* @copyright Copyright (c) 2022 Vincent Petry <vincent@nextloud.com> | ||
* | ||
* @author Vincent Petry <vincent@nextcloud.com> | ||
* | ||
* @license GNU AGPL version 3 or any later version | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
namespace OCA\Files_Sharing\Migration; | ||
|
||
use Closure; | ||
use OCP\DB\Types; | ||
use OCP\DB\ISchemaWrapper; | ||
use OCP\Migration\IOutput; | ||
use OCP\Migration\SimpleMigrationStep; | ||
|
||
class Version24000Date20220208195521 extends SimpleMigrationStep { | ||
|
||
/** | ||
* @param IOutput $output | ||
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` | ||
* @param array $options | ||
* @return null|ISchemaWrapper | ||
*/ | ||
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { | ||
$schema = $schemaClosure(); | ||
$table = $schema->getTable('share'); | ||
$table->addColumn('password_expiration_time', Types::DATETIME, [ | ||
'notnull' => false, | ||
]); | ||
return $schema; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.