diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-05-19 00:50:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-19 00:50:44 +0200 |
commit | 7976927628fba974570753759b9aaebb1faee413 (patch) | |
tree | 0c0b64e674795f21008c10c24d40e56953a2643f /lib | |
parent | 8c624bdef9f3d7c2304ba4a3fba9dbbb23c65f3e (diff) | |
parent | 19a1e01d6cc08e486bb5afe83f25b2c28852603d (diff) | |
download | nextcloud-server-7976927628fba974570753759b9aaebb1faee413.tar.gz nextcloud-server-7976927628fba974570753759b9aaebb1faee413.zip |
Merge pull request #4894 from nextcloud/generic-security-activities
Change 2FA activities to more generic security activities
Diffstat (limited to 'lib')
-rw-r--r-- | lib/composer/composer/autoload_classmap.php | 3 | ||||
-rw-r--r-- | lib/composer/composer/autoload_static.php | 3 | ||||
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/Manager.php | 11 |
3 files changed, 12 insertions, 5 deletions
diff --git a/lib/composer/composer/autoload_classmap.php b/lib/composer/composer/autoload_classmap.php index 8e65ca365e4..326c0856e50 100644 --- a/lib/composer/composer/autoload_classmap.php +++ b/lib/composer/composer/autoload_classmap.php @@ -786,6 +786,9 @@ return array( 'OC\\Session\\Memory' => $baseDir . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => $baseDir . '/lib/private/Session/Session.php', 'OC\\Settings\\Activity\\Provider' => $baseDir . '/settings/Activity/Provider.php', + 'OC\\Settings\\Activity\\SecurityFilter' => $baseDir . '/settings/Activity/SecurityFilter.php', + 'OC\\Settings\\Activity\\SecurityProvider' => $baseDir . '/settings/Activity/SecurityProvider.php', + 'OC\\Settings\\Activity\\SecuritySetting' => $baseDir . '/settings/Activity/SecuritySetting.php', 'OC\\Settings\\Activity\\Setting' => $baseDir . '/settings/Activity/Setting.php', 'OC\\Settings\\Admin\\Additional' => $baseDir . '/lib/private/Settings/Admin/Additional.php', 'OC\\Settings\\Admin\\Encryption' => $baseDir . '/lib/private/Settings/Admin/Encryption.php', diff --git a/lib/composer/composer/autoload_static.php b/lib/composer/composer/autoload_static.php index b9a1545e6a3..c1ef42c1273 100644 --- a/lib/composer/composer/autoload_static.php +++ b/lib/composer/composer/autoload_static.php @@ -816,6 +816,9 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c 'OC\\Session\\Memory' => __DIR__ . '/../../..' . '/lib/private/Session/Memory.php', 'OC\\Session\\Session' => __DIR__ . '/../../..' . '/lib/private/Session/Session.php', 'OC\\Settings\\Activity\\Provider' => __DIR__ . '/../../..' . '/settings/Activity/Provider.php', + 'OC\\Settings\\Activity\\SecurityFilter' => __DIR__ . '/../../..' . '/settings/Activity/SecurityFilter.php', + 'OC\\Settings\\Activity\\SecurityProvider' => __DIR__ . '/../../..' . '/settings/Activity/SecurityProvider.php', + 'OC\\Settings\\Activity\\SecuritySetting' => __DIR__ . '/../../..' . '/settings/Activity/SecuritySetting.php', 'OC\\Settings\\Activity\\Setting' => __DIR__ . '/../../..' . '/settings/Activity/Setting.php', 'OC\\Settings\\Admin\\Additional' => __DIR__ . '/../../..' . '/lib/private/Settings/Admin/Additional.php', 'OC\\Settings\\Admin\\Encryption' => __DIR__ . '/../../..' . '/lib/private/Settings/Admin/Encryption.php', diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 1d0deada696..06aa0224ae0 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -23,6 +23,7 @@ namespace OC\Authentication\TwoFactorAuth; +use BadMethodCallException; use Exception; use OC; use OC\App\AppManager; @@ -218,16 +219,16 @@ class Manager { */ private function publishEvent(IUser $user, $event, array $params) { $activity = $this->activityManager->generateEvent(); - $activity->setApp('twofactor_generic') - ->setType('twofactor') + $activity->setApp('core') + ->setType('security') ->setAuthor($user->getUID()) ->setAffectedUser($user->getUID()) ->setSubject($event, $params); try { $this->activityManager->publish($activity); - } catch (Exception $e) { - $this->logger->warning('could not publish backup code creation activity', ['app' => 'twofactor_backupcodes']); - $this->logger->logException($e, ['app' => 'twofactor_backupcodes']); + } catch (BadMethodCallException $e) { + $this->logger->warning('could not publish backup code creation activity', ['app' => 'core']); + $this->logger->logException($e, ['app' => 'core']); } } |