Skip to content

Commit

Permalink
Change URL for users_and_roles
Browse files Browse the repository at this point in the history
Need to change folder and file names but will punt until after 7.14FF

I did throw in updating the logic file path
  • Loading branch information
scottybollinger committed Jun 23, 2021
1 parent ae4c9bf commit 92e493e
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('useAppSearchNav', () => {
{
id: 'usersRoles',
name: 'Users and roles',
href: '/role_mappings',
href: '/users_and_roles',
},
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { generateNavLink } from '../../../shared/layout';
import { ROLE_MAPPINGS_TITLE } from '../../../shared/role_mapping/constants';

import { AppLogic } from '../../app_logic';
import { ENGINES_PATH, SETTINGS_PATH, CREDENTIALS_PATH, ROLE_MAPPINGS_PATH } from '../../routes';
import { ENGINES_PATH, SETTINGS_PATH, CREDENTIALS_PATH, USERS_AND_ROLES_PATH } from '../../routes';
import { CREDENTIALS_TITLE } from '../credentials';
import { useEngineNav } from '../engine/engine_nav';
import { ENGINES_TITLE } from '../engines';
Expand Down Expand Up @@ -57,7 +57,7 @@ export const useAppSearchNav = () => {
navItems.push({
id: 'usersRoles',
name: ROLE_MAPPINGS_TITLE,
...generateNavLink({ to: ROLE_MAPPINGS_PATH }),
...generateNavLink({ to: USERS_AND_ROLES_PATH }),
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ interface RoleMappingsValues {
}

export const RoleMappingsLogic = kea<MakeLogicType<RoleMappingsValues, RoleMappingsActions>>({
path: ['enterprise_search', 'app_search', 'role_mappings'],
path: ['enterprise_search', 'app_search', 'users_and_roles'],
actions: {
setRoleMappingsData: (data: RoleMappingsServerDetails) => data,
setRoleMapping: (roleMapping: ASRoleMapping) => ({ roleMapping }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,6 @@ describe('AppSearchNav', () => {
setMockValues({ myRole: { canViewRoleMappings: true } });
const wrapper = shallow(<AppSearchNav />);

expect(wrapper.find(SideNavLink).last().prop('to')).toEqual('/role_mappings');
expect(wrapper.find(SideNavLink).last().prop('to')).toEqual('/users_and_roles');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
SETUP_GUIDE_PATH,
SETTINGS_PATH,
CREDENTIALS_PATH,
ROLE_MAPPINGS_PATH,
USERS_AND_ROLES_PATH,
ENGINES_PATH,
ENGINE_PATH,
LIBRARY_PATH,
Expand Down Expand Up @@ -128,7 +128,7 @@ export const AppSearchConfigured: React.FC<Required<InitialAppData>> = (props) =
</Route>
)}
{canViewRoleMappings && (
<Route path={ROLE_MAPPINGS_PATH}>
<Route path={USERS_AND_ROLES_PATH}>
<RoleMappings />
</Route>
)}
Expand Down Expand Up @@ -162,7 +162,7 @@ export const AppSearchNav: React.FC = () => {
<SideNavLink to={CREDENTIALS_PATH}>{CREDENTIALS_TITLE}</SideNavLink>
)}
{canViewRoleMappings && (
<SideNavLink shouldShowActiveForSubroutes to={ROLE_MAPPINGS_PATH}>
<SideNavLink shouldShowActiveForSubroutes to={USERS_AND_ROLES_PATH}>
{ROLE_MAPPINGS_TITLE}
</SideNavLink>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const LIBRARY_PATH = '/library';
export const SETTINGS_PATH = '/settings';
export const CREDENTIALS_PATH = '/credentials';

export const ROLE_MAPPINGS_PATH = '/role_mappings';
export const USERS_AND_ROLES_PATH = '/users_and_roles';

export const ENGINES_PATH = '/engines';
export const ENGINE_CREATION_PATH = `${ENGINES_PATH}/new`; // This is safe from conflicting with an :engineName path because new is a reserved name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('useWorkplaceSearchNav', () => {
{
id: 'usersRoles',
name: 'Users and roles',
href: '/role_mappings',
href: '/users_and_roles',
},
{
id: 'security',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { NAV } from '../../constants';
import {
SOURCES_PATH,
SECURITY_PATH,
ROLE_MAPPINGS_PATH,
USERS_AND_ROLES_PATH,
GROUPS_PATH,
ORG_SETTINGS_PATH,
} from '../../routes';
Expand Down Expand Up @@ -48,7 +48,7 @@ export const useWorkplaceSearchNav = () => {
{
id: 'usersRoles',
name: NAV.ROLE_MAPPINGS,
...generateNavLink({ to: ROLE_MAPPINGS_PATH }),
...generateNavLink({ to: USERS_AND_ROLES_PATH }),
},
{
id: 'security',
Expand Down Expand Up @@ -92,7 +92,7 @@ export const WorkplaceSearchNav: React.FC<Props> = ({
<SideNavLink to={GROUPS_PATH} subNav={groupsSubNav}>
{NAV.GROUPS}
</SideNavLink>
<SideNavLink shouldShowActiveForSubroutes to={ROLE_MAPPINGS_PATH}>
<SideNavLink shouldShowActiveForSubroutes to={USERS_AND_ROLES_PATH}>
{NAV.ROLE_MAPPINGS}
</SideNavLink>
<SideNavLink to={SECURITY_PATH}>{NAV.SECURITY}</SideNavLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
SOURCE_ADDED_PATH,
PERSONAL_SOURCES_PATH,
ORG_SETTINGS_PATH,
ROLE_MAPPINGS_PATH,
USERS_AND_ROLES_PATH,
SECURITY_PATH,
PERSONAL_SETTINGS_PATH,
PERSONAL_PATH,
Expand Down Expand Up @@ -103,7 +103,7 @@ export const WorkplaceSearchConfigured: React.FC<InitialAppData> = (props) => {
<Route path={GROUPS_PATH}>
<GroupsRouter />
</Route>
<Route path={ROLE_MAPPINGS_PATH}>
<Route path={USERS_AND_ROLES_PATH}>
<RoleMappings />
</Route>
<Route path={SECURITY_PATH}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const ENT_SEARCH_LICENSE_MANAGEMENT = `${docLinks.enterpriseSearchBase}/l

export const PERSONAL_PATH = '/p';

export const ROLE_MAPPINGS_PATH = '/role_mappings';
export const USERS_AND_ROLES_PATH = '/users_and_roles';

export const USERS_PATH = '/users';
export const SECURITY_PATH = '/security';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ interface RoleMappingsValues {
}

export const RoleMappingsLogic = kea<MakeLogicType<RoleMappingsValues, RoleMappingsActions>>({
path: ['enterprise_search', 'workplace_search', 'role_mappings'],
path: ['enterprise_search', 'workplace_search', 'users_and_roles'],
actions: {
setRoleMappingsData: (data: RoleMappingsServerDetails) => data,
setRoleMapping: (roleMapping: WSRoleMapping) => ({ roleMapping }),
Expand Down

0 comments on commit 92e493e

Please sign in to comment.