aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-24 10:56:55 +0200
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>2017-07-25 09:20:30 +0200
commit10a850b95d08ecb8efe911cd23570fef3ab5733e (patch)
treea7b79d6de7a275a97be7af150064af8ecead8a80 /server
parentecf97687cf76656cdbc0ac1bc937089afb68c607 (diff)
downloadsonarqube-10a850b95d08ecb8efe911cd23570fef3ab5733e.tar.gz
sonarqube-10a850b95d08ecb8efe911cd23570fef3ab5733e.zip
SONAR-9566 Don't redirect to "My Issues" at organization level
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/components/OrganizationPage.js10
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigation.js9
-rw-r--r--server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js3
3 files changed, 4 insertions, 18 deletions
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 (
<div>
<Helmet defaultTitle={organization.name} titleTemplate={'%s - ' + organization.name} />
- <OrganizationNavigation
- currentUser={this.props.currentUser}
- organization={organization}
- location={this.props.location}
- />
+ <OrganizationNavigation organization={organization} location={this.props.location} />
{this.props.children}
</div>
);
@@ -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 {
<Link
to={{
pathname: `/organizations/${organization.key}/issues`,
- query:
- currentUser.isLoggedIn && isMySet()
- ? { resolved: 'false', myIssues: 'true' }
- : { resolved: 'false' }
+ query: { resolved: 'false' }
}}
activeClassName="active">
{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(
<OrganizationNavigation
- currentUser={{ isLoggedIn: true }}
location={{ pathname: '/organizations/foo' }}
organization={organization}
/>
@@ -43,7 +42,6 @@ it('admin', () => {
expect(
shallow(
<OrganizationNavigation
- currentUser={{ isLoggedIn: true }}
location={{ pathname: '/organizations/foo' }}
organization={organization}
/>
@@ -56,7 +54,6 @@ it('undeletable org', () => {
expect(
shallow(
<OrganizationNavigation
- currentUser={{ isLoggedIn: true }}
location={{ pathname: '/organizations/foo' }}
organization={organization}
/>