From: Grégoire Aubert Date: Mon, 24 Jul 2017 08:56:55 +0000 (+0200) Subject: SONAR-9566 Don't redirect to "My Issues" at organization level X-Git-Tag: 6.6-RC1~826 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=10a850b95d08ecb8efe911cd23570fef3ab5733e;p=sonarqube.git SONAR-9566 Don't redirect to "My Issues" at organization level --- diff --git a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.js b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.js index 9111c0c70e2..de6ded0a88b 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.js @@ -24,7 +24,7 @@ import { connect } from 'react-redux'; import OrganizationNavigation from '../navigation/OrganizationNavigation'; import NotFound from '../../../app/components/NotFound'; import { fetchOrganization } from '../actions'; -import { getCurrentUser, getOrganizationByKey } from '../../../store/rootReducer'; +import { getOrganizationByKey } from '../../../store/rootReducer'; import type { Organization } from '../../../store/organizations/duck'; type OwnProps = { @@ -33,7 +33,6 @@ type OwnProps = { type Props = { children?: React.Element<*>, - currentUser: { isLoggedIn: boolean, showOnboardingTutorial: true }, location: Object, organization: null | Organization, params: { organizationKey: string }, @@ -89,11 +88,7 @@ class OrganizationPage extends React.PureComponent { return (
- + {this.props.children}
); @@ -101,7 +96,6 @@ class OrganizationPage extends React.PureComponent { } const mapStateToProps = (state, ownProps: OwnProps) => ({ - currentUser: getCurrentUser(state), organization: getOrganizationByKey(state, ownProps.params.organizationKey) }); diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js index e6c50799dbc..382ea88ac87 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js @@ -25,7 +25,6 @@ import { translate } from '../../../helpers/l10n'; import ContextNavBar from '../../../components/nav/ContextNavBar'; import NavBarTabs from '../../../components/nav/NavBarTabs'; import OrganizationIcon from '../../../components/icons-components/OrganizationIcon'; -import { isMySet } from '../../issues/utils'; import { getQualityGatesUrl } from '../../../helpers/urls'; import type { Organization } from '../../../store/organizations/duck'; @@ -40,7 +39,6 @@ const ADMIN_PATHS = [ export default class OrganizationNavigation extends React.PureComponent { props: { - currentUser: { isLoggedIn: boolean }, location: { pathname: string }, organization: Organization }; @@ -138,7 +136,7 @@ export default class OrganizationNavigation extends React.PureComponent { } render() { - const { currentUser, organization, location } = this.props; + const { organization, location } = this.props; const isHomeActive = location.pathname === `organizations/${organization.key}/projects` || @@ -203,10 +201,7 @@ export default class OrganizationNavigation extends React.PureComponent { {translate('issues.page')} diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js index f4a2b09a38b..3f337c032d5 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js @@ -30,7 +30,6 @@ it('regular user', () => { expect( shallow( @@ -43,7 +42,6 @@ it('admin', () => { expect( shallow( @@ -56,7 +54,6 @@ it('undeletable org', () => { expect( shallow(