aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-07-08 09:32:10 -0700
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-07-08 09:32:10 -0700
commit15907f6aee6c8a7affefb828aecee0da41887f79 (patch)
treee453302d3de944f3ad773f08aca88944ab5a068e
parent02d2e41e04735e91c94864a98c5eed89b6ceb7f7 (diff)
parent5c2a0325ba7217c5a28c98fa4fed9867cf0a8f7f (diff)
downloadnextcloud-server-15907f6aee6c8a7affefb828aecee0da41887f79.tar.gz
nextcloud-server-15907f6aee6c8a7affefb828aecee0da41887f79.zip
Merge pull request #3979 from owncloud/permissions-hook
Add update permissions hook to sharing
-rw-r--r--lib/public/share.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 7ae0ffe0bfd..d852230afaf 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -657,6 +657,15 @@ class Share {
}
$query = \OC_DB::prepare('UPDATE `*PREFIX*share` SET `permissions` = ? WHERE `id` = ?');
$query->execute(array($permissions, $item['id']));
+ \OC_Hook::emit('OCP\Share', 'post_update_permissions', array(
+ 'itemType' => $itemType,
+ 'itemSource' => $itemSource,
+ 'itemTarget' => $itemTarget,
+ 'shareType' => $shareType,
+ 'shareWith' => $shareWith,
+ 'uidOwner' => \OC_User::getUser(),
+ 'permissions' => $permissions,
+ ));
// Check if permissions were removed
if ($item['permissions'] & ~$permissions) {
// If share permission is removed all reshares must be deleted