summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
authorRoger Szabo <roger.szabo@web.de>2017-04-25 19:06:49 +0800
committerRoger Szabo <roger.szabo@web.de>2017-04-25 19:06:49 +0800
commitf1522a8dca5e687e9faf6da9f4787c1ea2808d48 (patch)
tree70360cbdbe1bc42af00145b11af7ce8efc8debff /apps/admin_audit
parent133f3fdc9aec28383dba323d58569eddd160b0df (diff)
downloadnextcloud-server-f1522a8dca5e687e9faf6da9f4787c1ea2808d48.tar.gz
nextcloud-server-f1522a8dca5e687e9faf6da9f4787c1ea2808d48.zip
4190
Signed-off-by: Roger Szabo <roger.szabo@web.de>
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/lib/actions/groupmanagement.php32
-rw-r--r--apps/admin_audit/lib/auditlogger.php3
2 files changed, 35 insertions, 0 deletions
diff --git a/apps/admin_audit/lib/actions/groupmanagement.php b/apps/admin_audit/lib/actions/groupmanagement.php
index a341e4de27b..34aec7812c5 100644
--- a/apps/admin_audit/lib/actions/groupmanagement.php
+++ b/apps/admin_audit/lib/actions/groupmanagement.php
@@ -4,6 +4,7 @@
*
* @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Roger Szabo <roger.szabo@web.de>
*
* @license GNU AGPL version 3 or any later version
*
@@ -72,5 +73,36 @@ class GroupManagement extends Action {
]
);
}
+
+ /**
+ * log create group to group event
+ *
+ * @param IGroup $group
+ */
+ public function createGroup(IGroup $group) {
+ $this->log('Group created: "%s"',
+ [
+ 'group' => $group->getGID()
+ ],
+ [
+ 'group'
+ ]
+ );
+ }
+ /**
+ * log delete group to group event
+ *
+ * @param IGroup $group
+ */
+ public function deleteGroup(IGroup $group) {
+ $this->log('Group deleted: "%s"',
+ [
+ 'group' => $group->getGID()
+ ],
+ [
+ 'group'
+ ]
+ );
+ }
}
diff --git a/apps/admin_audit/lib/auditlogger.php b/apps/admin_audit/lib/auditlogger.php
index 20d34655507..a01fec63019 100644
--- a/apps/admin_audit/lib/auditlogger.php
+++ b/apps/admin_audit/lib/auditlogger.php
@@ -5,6 +5,7 @@
*
* @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Lukas Reschke <lukas@statuscode.ch>
+ * @author Roger Szabo <roger.szabo@web.de>
*
* @license GNU AGPL version 3 or any later version
*
@@ -96,6 +97,8 @@ class AuditLogger {
$groupActions = new GroupManagement($this->logger);
$this->groupManager->listen('\OC\Group', 'postRemoveUser', [$groupActions, 'removeUser']);
$this->groupManager->listen('\OC\Group', 'postAddUser', [$groupActions, 'addUser']);
+ $this->groupManager->listen('\OC\Group', 'postDelete', [$groupActions, 'deleteGroup']);
+ $this->groupManager->listen('\OC\Group', 'postCreate', [$groupActions, 'createGroup']);
}
/**