mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
access all subvaults option for org users
This commit is contained in:
parent
f92c5a214f
commit
4ba21638b1
@ -24,6 +24,7 @@
|
||||
}
|
||||
$scope.email = user.Email;
|
||||
$scope.type = user.Type;
|
||||
$scope.accessAllSubvaults = user.AccessAllSubvaults;
|
||||
$scope.selectedSubvaults = subvaults;
|
||||
});
|
||||
});
|
||||
@ -72,15 +73,18 @@
|
||||
$scope.submitPromise = null;
|
||||
$scope.submit = function (model) {
|
||||
var subvaults = [];
|
||||
if (!$scope.accessAllSubvaults) {
|
||||
for (var subvaultId in $scope.selectedSubvaults) {
|
||||
if ($scope.selectedSubvaults.hasOwnProperty(subvaultId)) {
|
||||
subvaults.push($scope.selectedSubvaults[subvaultId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.submitPromise = apiService.organizationUsers.put({ orgId: $state.params.orgId, id: id }, {
|
||||
type: $scope.type,
|
||||
subvaults: subvaults
|
||||
subvaults: subvaults,
|
||||
accessAllSubvaults: $scope.accessAllSubvaults
|
||||
}, function () {
|
||||
$uibModalInstance.close();
|
||||
}).$promise;
|
||||
|
@ -60,16 +60,20 @@
|
||||
$scope.submitPromise = null;
|
||||
$scope.submit = function (model) {
|
||||
var subvaults = [];
|
||||
|
||||
if (!model.accessAllSubvaults) {
|
||||
for (var subvaultId in $scope.selectedSubvaults) {
|
||||
if ($scope.selectedSubvaults.hasOwnProperty(subvaultId)) {
|
||||
subvaults.push($scope.selectedSubvaults[subvaultId]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$scope.submitPromise = apiService.organizationUsers.invite({ orgId: $state.params.orgId }, {
|
||||
email: model.email,
|
||||
type: model.type,
|
||||
subvaults: subvaults
|
||||
subvaults: subvaults,
|
||||
accessAllSubvaults: model.accessAllSubvaults
|
||||
}, function () {
|
||||
$uibModalInstance.close();
|
||||
}).$promise;
|
||||
|
@ -32,8 +32,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<h4>Subvault Access</h4>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="accessAllSubvaults" name="AccessAllSubvaults"
|
||||
ng-value="true" ng-checked="accessAllSubvaults">
|
||||
This user can access and modify items in <u>all</u> current and future subvaults.
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="accessAllSubvaults" name="AccessAllSubvaults"
|
||||
ng-value="false" ng-checked="!accessAllSubvaults">
|
||||
This user can access only the selected subvaults.
|
||||
</label>
|
||||
</div>
|
||||
<div ng-show="!accessAllSubvaults">
|
||||
<div ng-show="loading && !subvaults.length">
|
||||
Loading...
|
||||
Loading subvaults...
|
||||
</div>
|
||||
<div ng-show="!loading && !subvaults.length">
|
||||
<p>No subvaults for your organization.</p>
|
||||
@ -76,6 +91,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary btn-flat" ng-disabled="form.$loading">
|
||||
<i class="fa fa-refresh fa-spin loading-icon" ng-show="form.$loading"></i>Submit
|
||||
|
@ -40,8 +40,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<h4>Subvault Access</h4>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="model.accessAllSubvaults" name="AccessAllSubvaults"
|
||||
ng-value="true" ng-checked="model.accessAllSubvaults">
|
||||
This user can access and modify items in <u>all</u> current and future subvaults.
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" ng-model="model.accessAllSubvaults" name="AccessAllSubvaults"
|
||||
ng-value="false" ng-checked="!model.accessAllSubvaults">
|
||||
This user can access only the selected subvaults.
|
||||
</label>
|
||||
</div>
|
||||
<div ng-show="!model.accessAllSubvaults">
|
||||
<div ng-show="loading && !subvaults.length">
|
||||
Loading...
|
||||
Loading subvaults...
|
||||
</div>
|
||||
<div ng-show="!loading && !subvaults.length">
|
||||
<p>No subvaults for your organization.</p>
|
||||
@ -84,6 +99,7 @@
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" class="btn btn-primary btn-flat" ng-disabled="inviteForm.$loading">
|
||||
<i class="fa fa-refresh fa-spin loading-icon" ng-show="inviteForm.$loading"></i>Send Invite
|
||||
|
Loading…
Reference in New Issue
Block a user