Fix login problem (unathorized user cannot login). (#812)

main
Nikita Manovich 6 years ago committed by GitHub
parent 9016805f8e
commit 1487ceafb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,7 +42,8 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
} }
public componentDidUpdate() { public componentDidUpdate() {
if (!this.props.userInitialized) { if (!this.props.userInitialized ||
this.props.userInitialized && this.props.user == null) {
return; return;
} }
@ -89,10 +90,10 @@ export default class CVATApplication extends React.PureComponent<CVATAppProps> {
// Where you go depends on your URL // Where you go depends on your URL
public render() { public render() {
const readyForRender = this.props.userInitialized const readyForRender =
&& this.props.formatsInitialized (this.props.userInitialized && this.props.user == null) ||
&& this.props.pluginsInitialized (this.props.userInitialized && this.props.formatsInitialized &&
&& this.props.usersInitialized; this.props.pluginsInitialized &&this.props.usersInitialized);
if (readyForRender) { if (readyForRender) {
if (this.props.user) { if (this.props.user) {

Loading…
Cancel
Save