diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-04-13 19:40:33 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-07 09:04:07 +0200 |
commit | 2d581c675fb488df0875e4a489821cf88b7679ac (patch) | |
tree | 4180d67536e781d399e2b6336e2a8b49ca8abd7b /apps/files_sharing/lib_share.php | |
parent | a2df8a4746dd9c355541501e78726daaa6dbec43 (diff) | |
download | nextcloud-server-2d581c675fb488df0875e4a489821cf88b7679ac.tar.gz nextcloud-server-2d581c675fb488df0875e4a489821cf88b7679ac.zip |
Audit: Log sharing actions
Diffstat (limited to 'apps/files_sharing/lib_share.php')
-rwxr-xr-x | apps/files_sharing/lib_share.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_sharing/lib_share.php b/apps/files_sharing/lib_share.php index d5cf3d0a1ba..14c61c620a1 100755 --- a/apps/files_sharing/lib_share.php +++ b/apps/files_sharing/lib_share.php @@ -43,6 +43,7 @@ class OC_Share { $query = OCP\DB::prepare("INSERT INTO *PREFIX*sharing VALUES(?,?,?,?,?)"); if ($uid_shared_with == self::PUBLICLINK) { $token = sha1("$uid_shared_with-$source"); + OCP\Util::emitHook('OC_Share', 'public', array('source'=>$source, 'token'=>$token, 'permissions'=>$permissions)); $query->execute(array($uid_owner, self::PUBLICLINK, $source, $token, $permissions)); $this->token = $token; } else { @@ -97,6 +98,7 @@ class OC_Share { if (isset($gid)) { $uid = $uid."@".$gid; } + OCP\Util::emitHook('OC_Share', 'user', array('source'=>$source, 'target'=>$target, 'with'=>$uid, 'permissions'=>$permissions)); $query->execute(array($uid_owner, $uid, $source, $target, $permissions)); // Add file to filesystem cache $userDirectory = "/".OCP\USER::getUser()."/files"; |