Small fix adding users to shared list

This commit is contained in:
brantje 2016-10-07 15:50:08 +02:00
parent ca590057b5
commit 69c303552b
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F

View file

@ -170,7 +170,13 @@ angular.module('passmanApp')
pending: true,
credential_guid: $scope.storedCredential.guid
};
if ($scope.share_settings.credentialSharedWithUserAndGroup.indexOf(obj) === -1) {
var found = false;
for(var z = 0; z < $scope.share_settings.credentialSharedWithUserAndGroup.length; z++){
if($scope.share_settings.credentialSharedWithUserAndGroup[z].userId == shareWith[z].uid){
found = true;
}
}
if (found === false) {
$scope.share_settings.credentialSharedWithUserAndGroup.push(obj)
}
}