aboutsummaryrefslogtreecommitdiffstats
path: root/apps/admin_audit/lib/Actions/UserManagement.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2023-03-13 09:57:55 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-09-10 14:06:12 +0200
commitf532d3b2861642b0bc7b70aed8b7f95706b24bb0 (patch)
treedc37f88287b01204951ef0a9a06cb3d77a56b896 /apps/admin_audit/lib/Actions/UserManagement.php
parent986a3d45f8fab60c8e7dddc7015bd60c6ee356d4 (diff)
downloadnextcloud-server-f532d3b2861642b0bc7b70aed8b7f95706b24bb0.tar.gz
nextcloud-server-f532d3b2861642b0bc7b70aed8b7f95706b24bb0.zip
feat(admin_audit): Move admin_audit hooks to modern event listeners
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'apps/admin_audit/lib/Actions/UserManagement.php')
-rw-r--r--apps/admin_audit/lib/Actions/UserManagement.php80
1 files changed, 0 insertions, 80 deletions
diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php
index 25960197847..5b8b11f196b 100644
--- a/apps/admin_audit/lib/Actions/UserManagement.php
+++ b/apps/admin_audit/lib/Actions/UserManagement.php
@@ -7,28 +7,12 @@ declare(strict_types=1);
*/
namespace OCA\AdminAudit\Actions;
-use OCP\IUser;
-
/**
* Class UserManagement logs all user management related actions.
*
* @package OCA\AdminAudit\Actions
*/
class UserManagement extends Action {
- /**
- * Log creation of users
- *
- * @param array $params
- */
- public function create(array $params): void {
- $this->log(
- 'User created: "%s"',
- $params,
- [
- 'uid',
- ]
- );
- }
/**
* Log assignments of users (typically user backends)
@@ -44,21 +28,6 @@ class UserManagement extends Action {
}
/**
- * Log deletion of users
- *
- * @param array $params
- */
- public function delete(array $params): void {
- $this->log(
- 'User deleted: "%s"',
- $params,
- [
- 'uid',
- ]
- );
- }
-
- /**
* Log unassignments of users (typically user backends, no data removed)
*
* @param string $uid
@@ -70,53 +39,4 @@ class UserManagement extends Action {
[ 'uid' ]
);
}
-
- /**
- * Log enabling of users
- *
- * @param array $params
- */
- public function change(array $params): void {
- switch ($params['feature']) {
- case 'enabled':
- $this->log(
- $params['value'] === true
- ? 'User enabled: "%s"'
- : 'User disabled: "%s"',
- ['user' => $params['user']->getUID()],
- [
- 'user',
- ]
- );
- break;
- case 'eMailAddress':
- $this->log(
- 'Email address changed for user %s',
- ['user' => $params['user']->getUID()],
- [
- 'user',
- ]
- );
- break;
- }
- }
-
- /**
- * Logs changing of the user scope
- *
- * @param IUser $user
- */
- public function setPassword(IUser $user): void {
- if ($user->getBackendClassName() === 'Database') {
- $this->log(
- 'Password of user "%s" has been changed',
- [
- 'user' => $user->getUID(),
- ],
- [
- 'user',
- ]
- );
- }
- }
}