diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2013-07-08 11:40:10 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2013-07-08 11:40:10 -0400 |
commit | 5c2a0325ba7217c5a28c98fa4fed9867cf0a8f7f (patch) | |
tree | e453302d3de944f3ad773f08aca88944ab5a068e | |
parent | 02d2e41e04735e91c94864a98c5eed89b6ceb7f7 (diff) | |
download | nextcloud-server-5c2a0325ba7217c5a28c98fa4fed9867cf0a8f7f.tar.gz nextcloud-server-5c2a0325ba7217c5a28c98fa4fed9867cf0a8f7f.zip |
Add update permissions hook to sharing
-rw-r--r-- | lib/public/share.php | 9 |
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 |