Browse Source

redirect to the login page when accessing private project anonymously

tags/7.5
Stas Vilchik 5 years ago
parent
commit
4eaf72862f

+ 2
- 2
server/sonar-web/src/main/js/app/components/ComponentContainer.tsx View File

@@ -104,9 +104,9 @@ export class ComponentContainer extends React.PureComponent<Props, State> {
const { branch, id: key, pullRequest } = props.location.query;
this.setState({ loading: true });

const onError = (error: any) => {
const onError = (response?: Response) => {
if (this.mounted) {
if (error.response && error.response.status === 403) {
if (response && response.status === 403) {
handleRequiredAuthorization();
} else {
this.setState({ loading: false });

Loading…
Cancel
Save