Merge pull request #3979 from owncloud/permissions-hook
Add update permissions hook to sharing
This commit is contained in:
commit
15907f6aee
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue