directorySearchService.directorySearchEnabled()
      .then(function(directoryEnabled) {
        $scope.directoryEnabled = directoryEnabled;
        if (directoryEnabled) {
          initDirectorySearch();