diff options
Diffstat (limited to 'apps/admin_audit/lib/hooks_handlers.php')
-rw-r--r-- | apps/admin_audit/lib/hooks_handlers.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/apps/admin_audit/lib/hooks_handlers.php b/apps/admin_audit/lib/hooks_handlers.php new file mode 100644 index 00000000000..924878840a2 --- /dev/null +++ b/apps/admin_audit/lib/hooks_handlers.php @@ -0,0 +1,36 @@ +<?php + +class OC_Admin_Audit_Hooks_Handlers { + static public function rename($params) { + $oldpath = $params[OC_Filesystem::signal_param_oldpath]; + $newpath = $params[OC_Filesystem::signal_param_newpath]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Rename "'.$oldpath.'" to "'.$newpath.'" by '.$user, OCP\Util::INFO); + } + static public function create($params) { + $path = $params[OC_Filesystem::signal_param_path]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Create "'.$path.'" by '.$user, OCP\Util::INFO); + } + static public function copy($params) { + $oldpath = $params[OC_Filesystem::signal_param_oldpath]; + $newpath = $params[OC_Filesystem::signal_param_newpath]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Copy "'.$oldpath.'" to "'.$newpath.'" by '.$user, OCP\Util::INFO); + } + static public function write($params) { + $path = $params[OC_Filesystem::signal_param_path]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Write "'.$path.'" by '.$user, OCP\Util::INFO); + } + static public function read($params) { + $path = $params[OC_Filesystem::signal_param_path]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Read "'.$path.'" by '.$user, OCP\Util::INFO); + } + static public function delete($params) { + $path = $params[OC_Filesystem::signal_param_path]; + $user = OCP\User::getUser(); + OCP\Util::writeLog('admin_audit', 'Delete "'.$path.'" by '.$user, OCP\Util::INFO); + } +} |