aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/js/apps/issues/components/App.js6
-rw-r--r--server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx5
2 files changed, 11 insertions, 0 deletions
diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.js b/server/sonar-web/src/main/js/apps/issues/components/App.js
index d0befcca5af..cf11407a64b 100644
--- a/server/sonar-web/src/main/js/apps/issues/components/App.js
+++ b/server/sonar-web/src/main/js/apps/issues/components/App.js
@@ -53,6 +53,7 @@ import {
Component,
CurrentUser
} from '../utils'; */
+import handleRequiredAuthentication from '../../../app/utils/handleRequiredAuthentication';
import ListFooter from '../../../components/controls/ListFooter';
import EmptySearch from '../../../components/common/EmptySearch';
import ScreenPositionHelper from '../../../components/common/ScreenPositionHelper';
@@ -139,6 +140,11 @@ export default class App extends React.PureComponent {
componentDidMount() {
this.mounted = true;
+ if (this.state.myIssues && !this.props.currentUser.isLoggedIn) {
+ handleRequiredAuthentication();
+ return;
+ }
+
const footer = document.getElementById('footer');
if (footer) {
footer.classList.add('page-footer-with-sidebar');
diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
index deb67d0892e..4181d618a10 100644
--- a/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
+++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjects.tsx
@@ -24,6 +24,7 @@ import PageHeader from './PageHeader';
import ProjectsList from './ProjectsList';
import PageSidebar from './PageSidebar';
import Visualizations from '../visualizations/Visualizations';
+import handleRequiredAuthentication from '../../../app/utils/handleRequiredAuthentication';
import ListFooter from '../../../components/controls/ListFooter';
import { translate } from '../../../helpers/l10n';
import * as storage from '../../../helpers/storage';
@@ -60,6 +61,10 @@ export default class AllProjects extends React.PureComponent<Props, State> {
componentDidMount() {
this.mounted = true;
+ if (this.props.isFavorite && !this.context.currentUser.isLoggedIn) {
+ handleRequiredAuthentication();
+ return;
+ }
this.handleQueryChange(true);
const footer = document.getElementById('footer');
footer && footer.classList.add('page-footer-with-sidebar');