Skip to content

Commit

Permalink
Merge pull request #16556 from nextcloud/feature/16554_adminAuditShar…
Browse files Browse the repository at this point in the history
…eByMail/wiswedel

log email shares in admin_audit log
  • Loading branch information
MorrisJobke authored Jul 26, 2019
2 parents 3ba33ca + e98b2cb commit 4986241
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions apps/admin_audit/lib/Actions/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ public function shared(array $params) {
'id',
]
);
} elseif($params['shareType'] === Share::SHARE_TYPE_EMAIL) {
$this->log(
'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)',
$params,
[
'itemType',
'itemTarget',
'itemSource',
'shareWith',
'permissions',
'id',
]
);
}
}

Expand Down Expand Up @@ -147,6 +160,18 @@ public function unshare(array $params) {
'id',
]
);
} elseif($params['shareType'] === Share::SHARE_TYPE_EMAIL) {
$this->log(
'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)',
$params,
[
'itemType',
'fileTarget',
'itemSource',
'shareWith',
'id',
]
);
}
}

Expand Down

0 comments on commit 4986241

Please sign in to comment.