1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-05 01:53:55 +00:00

group accessall and readonly

This commit is contained in:
Kyle Spearrin
2017-05-10 12:17:26 -04:00
parent a4473ad739
commit ea24d72f01
8 changed files with 130 additions and 80 deletions

View File

@@ -13,7 +13,8 @@
}).then(function (group) {
$scope.group = {
id: id,
name: group.Name
name: group.Name,
accessAll: group.AccessAll
};
var collections = {};
@@ -59,11 +60,17 @@
};
$scope.submit = function () {
var group = $scope.group;
group.collectionIds = [];
for (var id in $scope.selectedCollections) {
if ($scope.selectedCollections.hasOwnProperty(id)) {
group.collectionIds.push(id);
var group = {
name: $scope.group.name,
accessAll: !!$scope.group.accessAll
};
if (!group.accessAll) {
group.collectionIds = [];
for (var id in $scope.selectedCollections) {
if ($scope.selectedCollections.hasOwnProperty(id)) {
group.collectionIds.push(id);
}
}
}