mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-10 06:01:32 +08:00
Api endpoint to get items shared with a vault
This commit is contained in:
parent
01a0d8bf05
commit
7252aa7f4a
3 changed files with 5 additions and 4 deletions
|
|
@ -53,6 +53,7 @@ return [
|
||||||
['name' => 'share#savePendingRequest', 'url' => '/api/v2/sharing/save', 'verb' => 'POST'],
|
['name' => 'share#savePendingRequest', 'url' => '/api/v2/sharing/save', 'verb' => 'POST'],
|
||||||
['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'GET'],
|
['name' => 'share#getPendingRequests', 'url' => '/api/v2/sharing/pending', 'verb' => 'GET'],
|
||||||
['name' => 'share#deleteShareRequest', 'url' => '/api/v2/sharing/decline/{share_request_id}', 'verb' => 'DELETE'],
|
['name' => 'share#deleteShareRequest', 'url' => '/api/v2/sharing/decline/{share_request_id}', 'verb' => 'DELETE'],
|
||||||
|
['name' => 'share#getVaultItems', 'url' => '/api/v2/sharing/get/{vault_guid}', 'verb' => 'GET'],
|
||||||
|
|
||||||
|
|
||||||
//Internal API
|
//Internal API
|
||||||
|
|
|
||||||
|
|
@ -210,8 +210,8 @@ class ShareController extends ApiController {
|
||||||
* Obtains the list of credentials shared with this vault
|
* Obtains the list of credentials shared with this vault
|
||||||
* @NoAdminRequired
|
* @NoAdminRequired
|
||||||
*/
|
*/
|
||||||
public function getSharedItems($vault_guid){
|
public function getVaultItems($vault_guid){
|
||||||
|
$this->shareService->getSharedItems($this->userId, $vault_guid);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteShareRequest($share_request_id){
|
public function deleteShareRequest($share_request_id){
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,8 @@ class ShareService {
|
||||||
return $this->shareRequest->getUserPendingRequests($user_id);
|
return $this->shareRequest->getUserPendingRequests($user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSharedItems($user_id, $vault_id){
|
public function getSharedItems($user_id, $vault_guid){
|
||||||
$entries = $this->sharingACL->getVaultEntries($user_id, $vault_id);
|
$entries = $this->sharingACL->getVaultEntries($user_id, $vault_guid);
|
||||||
$return = [];
|
$return = [];
|
||||||
foreach ($entries as $entry){
|
foreach ($entries as $entry){
|
||||||
$tmp = $entry->jsonSerialize();
|
$tmp = $entry->jsonSerialize();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue