summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-03-15 14:43:59 +0100
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-04-05 12:38:43 +0200
commit2ebf26e4447c6c5eef41be35ee4487c78ffe8231 (patch)
treeaa25e3c39bdcec0bc4b8abcc131060b721d8582e /apps/admin_audit
parent8fe914f07e1b4d41c02e127e2242e0a770535455 (diff)
downloadnextcloud-server-2ebf26e4447c6c5eef41be35ee4487c78ffe8231.tar.gz
nextcloud-server-2ebf26e4447c6c5eef41be35ee4487c78ffe8231.zip
admin_audit and dav listen to announce and revoke signals
also place them in doc Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/lib/Actions/UserManagement.php26
-rw-r--r--apps/admin_audit/lib/AppInfo/Application.php2
2 files changed, 28 insertions, 0 deletions
diff --git a/apps/admin_audit/lib/Actions/UserManagement.php b/apps/admin_audit/lib/Actions/UserManagement.php
index 45250d4e708..9e015160773 100644
--- a/apps/admin_audit/lib/Actions/UserManagement.php
+++ b/apps/admin_audit/lib/Actions/UserManagement.php
@@ -51,6 +51,19 @@ class UserManagement extends Action {
}
/**
+ * Log assignments of users (typically user backends)
+ *
+ * @param string $uid
+ */
+ public function announce(string $uid) {
+ $this->log(
+ 'UserID assgined: "%s"',
+ [ 'uid' => $uid ],
+ [ 'uid' ]
+ );
+ }
+
+ /**
* Log deletion of users
*
* @param array $params
@@ -66,6 +79,19 @@ class UserManagement extends Action {
}
/**
+ * Log unassignments of users (typically user backends, no data removed)
+ *
+ * @param string $uid
+ */
+ public function revoke(string $uid) {
+ $this->log(
+ 'UserID unassigned: "%s"',
+ [ 'uid' => $uid ],
+ [ 'uid' ]
+ );
+ }
+
+ /**
* Log enabling of users
*
* @param array $params
diff --git a/apps/admin_audit/lib/AppInfo/Application.php b/apps/admin_audit/lib/AppInfo/Application.php
index 5634a4a67b5..4f134ab308d 100644
--- a/apps/admin_audit/lib/AppInfo/Application.php
+++ b/apps/admin_audit/lib/AppInfo/Application.php
@@ -93,6 +93,8 @@ class Application extends App {
/** @var IUserSession|Session $userSession */
$userSession = $this->getContainer()->getServer()->getUserSession();
$userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']);
+ $userSession->listen('\OC\User', 'announceUser', [$userActions, 'announce']);
+ $userSession->listen('\OC\User', 'postRevokeUser', [$userActions, 'revoke']);
}
protected function groupHooks(ILogger $logger) {