diff options
-rw-r--r-- | core/Notification/CoreNotifier.php | 11 | ||||
-rw-r--r-- | lib/private/Repair/NC20/EncryptionLegacyCipher.php | 3 | ||||
-rw-r--r-- | lib/private/Repair/NC20/EncryptionMigration.php | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/core/Notification/CoreNotifier.php b/core/Notification/CoreNotifier.php index dd362dac8c1..709d83ab9c3 100644 --- a/core/Notification/CoreNotifier.php +++ b/core/Notification/CoreNotifier.php @@ -29,6 +29,7 @@ declare(strict_types=1); namespace OC\Core\Notification; +use OCP\IURLGenerator; use OCP\L10N\IFactory; use OCP\Notification\INotification; use OCP\Notification\INotifier; @@ -36,9 +37,12 @@ use OCP\Notification\INotifier; class CoreNotifier implements INotifier { /** @var IFactory */ private $l10nFactory; + /** @var IURLGenerator */ + private $url; - public function __construct(IFactory $factory) { + public function __construct(IFactory $factory, IURLGenerator $url) { $this->l10nFactory = $factory; + $this->url = $url; } /** @@ -76,8 +80,9 @@ class CoreNotifier implements INotifier { if ($notification->getSubject() === 'user_limit_reached') { $notification->setParsedSubject($l->t('The user limit of this instance is reached.')); - $notification->setParsedMessage($l->t('Add a subscription key to increase the user limit of this instance. For more information have a look at the Enterprise subscription page.')); - $notification->setLink('https://nextcloud.com/enterprise/order/'); + $notification->setParsedMessage($l->t('Enter your subscription key to increase the user limit. For more information about Nextcloud Enterprise see our website.')); + $notification->setLink('https://nextcloud.com/enterprise/'); + $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('core', 'places/contacts.svg'))); return $notification; } diff --git a/lib/private/Repair/NC20/EncryptionLegacyCipher.php b/lib/private/Repair/NC20/EncryptionLegacyCipher.php index 0be34679fcb..f887feefc98 100644 --- a/lib/private/Repair/NC20/EncryptionLegacyCipher.php +++ b/lib/private/Repair/NC20/EncryptionLegacyCipher.php @@ -58,7 +58,8 @@ class EncryptionLegacyCipher implements IRepairStep { return; } - if ($this->manager->isEnabled()) { + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); + if ($this->manager->isEnabled() || !empty($masterKeyId)) { if ($this->config->getSystemValue('encryption.legacy_format_support', '') === '') { $this->config->setSystemValue('encryption.legacy_format_support', true); } diff --git a/lib/private/Repair/NC20/EncryptionMigration.php b/lib/private/Repair/NC20/EncryptionMigration.php index 1eba09f413a..d5879073d59 100644 --- a/lib/private/Repair/NC20/EncryptionMigration.php +++ b/lib/private/Repair/NC20/EncryptionMigration.php @@ -58,7 +58,8 @@ class EncryptionMigration implements IRepairStep { return; } - if ($this->manager->isEnabled()) { + $masterKeyId = $this->config->getAppValue('encryption', 'masterKeyId'); + if ($this->manager->isEnabled() || !empty($masterKeyId)) { if ($this->config->getSystemValue('encryption.key_storage_migrated', '') === '') { $this->config->setSystemValue('encryption.key_storage_migrated', false); } |