Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

DashboardAppsDockCtrl = ($scope, $cookies, $uibModal, $window, MnoeOrganizations, MnoeAppInstances, MnoeProductInstances, MnoeConfig) ->
DashboardAppsDockCtrl = ($scope, $uibModal, $window, MnoeOrganizations, MnoeAppInstances, MnoeProductInstances, MnoeConfig) ->
'ngInject'

$scope.appDock = {}
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/mnoe-api/organizations.svc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ angular.module 'mnoEnterpriseAngular'

@reloadCurrentOrganization = () ->
orgId = _self.selectedId
$cookies.remove("#{orgId}_dhb_ref_id")
$cookies.remove("#{MnoeCurrentUser.user.id}_dhb_ref_id")
organizationPromise = null
_self.selectedId = null
MnoeCurrentUser.refresh().then(
Expand All @@ -51,7 +51,7 @@ angular.module 'mnoEnterpriseAngular'
MnoeApiSvc.one('/organizations', _self.selectedId).get().then(
(responseOrga) ->
# Use user id to avoid another user to load with an unknown organisation
$cookies.put("#{response.id}_dhb_ref_id", responseOrga.organization.id)
$cookies.put("#{response.id}_dhb_ref_id", responseOrga.organization.id, { path: '/' })

# Save the organization in the service
_self.selected = responseOrga.plain()
Expand Down