Merge pull request #16417 from nextcloud/design/backupcodes-notification

Backupcodes notification design details
This commit is contained in:
Morris Jobke 2019-07-16 13:20:56 +02:00 committed by GitHub
commit 86a399d82b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -56,10 +56,13 @@ class Notifier implements INotifier {
$notification->setParsedSubject(
$l->t('Generate backup codes')
)->setParsedMessage(
$l->t('You have enabled two-factor authentication but have not yet generated backup codes. Be sure to do this in case you lose access to your second factor.')
$l->t('You enabled two-factor authentication but did not generate backup codes yet. They are needed to restore access to your account in case you lose your second factor.')
);
$notification->setLink($this->url->linkToRouteAbsolute('settings.PersonalSettings.index', ['section' => 'security']));
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'actions/password.svg')));
return $notification;
default:

View File

@ -117,7 +117,7 @@ class NotifierTest extends TestCase {
->willReturnSelf();
$notification->expects($this->once())
->method('setParsedMessage')
->with('You have enabled two-factor authentication but have not yet generated backup codes. Be sure to do this in case you lose access to your second factor.')
->with('You enabled two-factor authentication but did not generate backup codes yet. They are needed to restore access to your account in case you lose your second factor.')
->willReturnSelf();
$this->url->expects($this->once())