kibana/x-pack/plugins/enterprise_search/server
Vadim Yakhin f96c9e5f2e
[Workplace search] Fix several router issues (#109839)
* Make "Add more sources" button take users to Add Sources instead of Sources

* Remove several redundant variables in codebase

`canCreateInvitations` and `canCreateContentSources` are always true for admin.
If someone can access admin dashboard, we can safely assume that they are admin.

`isCurated` is outdated variable and backend always returns it as false.

* Add redirect from workplace_search/p/ to workplace_search/p/sources/

Before workplace_search/p/ was returning 404

* Fix redirect always being fired on `workplace_search/p/sources/add` page load

When opening `workplace_search/p/sources/add` as a bookmark or reloading this page,
Sources router first get rendered *before* it receives the canCreatePersonalSources value.
This results in canCreatePersonalSources always being undefined on the first render,
and user always getting redirected to `workplace_search/p/sources`.
Here we check for this value being present before we render any routes.
2021-08-24 13:29:20 -03:00
..
__mocks__
collectors
lib [Workplace search] Fix several router issues (#109839) 2021-08-24 13:29:20 -03:00
routes [App Search] Migrate duplicate document handling UX for Crawler domains (#108623) 2021-08-17 11:59:51 -04:00
saved_objects
index.ts
plugin.ts