mirror of
https://github.com/nextcloud/passman.git
synced 2025-11-10 14:11:06 +08:00
Add acceptShareRequest
This commit is contained in:
parent
ca408ef0a3
commit
b56bda459a
4 changed files with 16 additions and 4 deletions
|
|
@ -72,6 +72,16 @@ angular.module('passmanApp')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.acceptShareRequest = function(share_request){
|
||||||
|
console.log('Accepted share request', share_request);
|
||||||
|
var crypted_shared_key = '';
|
||||||
|
ShareService.saveSharingRequest(share_request, crypted_shared_key).then(function (result) {
|
||||||
|
console.log(result)
|
||||||
|
})
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$scope.addCredential = function () {
|
$scope.addCredential = function () {
|
||||||
var new_credential = CredentialService.newCredential();
|
var new_credential = CredentialService.newCredential();
|
||||||
var enc_c = CredentialService.encryptCredential(new_credential);
|
var enc_c = CredentialService.encryptCredential(new_credential);
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,9 @@ angular.module('passmanApp')
|
||||||
item_guid: request.item_guid,
|
item_guid: request.item_guid,
|
||||||
target_vault_guid: request.target_vault_guid,
|
target_vault_guid: request.target_vault_guid,
|
||||||
final_shared_key: crypted_shared_key
|
final_shared_key: crypted_shared_key
|
||||||
});
|
}).then(function (response) {
|
||||||
|
return response.data;
|
||||||
|
})
|
||||||
},
|
},
|
||||||
encryptSharedCredential: function(credential, sharedKey){
|
encryptSharedCredential: function(credential, sharedKey){
|
||||||
var _credential = angular.copy(credential);
|
var _credential = angular.copy(credential);
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -270,7 +270,7 @@
|
||||||
HH:mm:ss'}}
|
HH:mm:ss'}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span class="link">Accept</span> | <span class="link">Decline</span>
|
<span class="link" ng-click="acceptShareRequest(share_request)">Accept</span> | <span class="link">Decline</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue