1
0
mirror of https://github.com/bitwarden/web synced 2025-12-11 05:43:16 +00:00

can only edit org when not self hosted

This commit is contained in:
Kyle Spearrin
2017-08-16 14:08:11 -04:00
parent 30a2301697
commit d7c1c6efa1
2 changed files with 10 additions and 5 deletions

View File

@@ -2,7 +2,8 @@
.module('bit.organization')
.controller('organizationSettingsController', function ($scope, $state, apiService, toastr, authService, $uibModal,
$analytics) {
$analytics, appSettings) {
$scope.selfHosted = appSettings.selfHosted;
$scope.model = {};
$scope.$on('$viewContentLoaded', function () {
apiService.organizations.get({ id: $state.params.orgId }, function (org) {
@@ -15,6 +16,10 @@
});
$scope.generalSave = function () {
if ($scope.selfHosted) {
return;
}
$scope.generalPromise = apiService.organizations.put({ id: $state.params.orgId }, $scope.model, function (org) {
authService.updateProfileOrganization(org).then(function (updatedOrg) {
$analytics.eventTrack('Updated Organization Settings');