browser: Access to private paths redirects to login. (#3622)

master
Krishna Srinivas 8 years ago committed by Harshavardhana
parent b4343a28b7
commit 659d5aabd1
  1. 5
      browser/app/js/actions.js

@ -16,10 +16,13 @@
import url from 'url'
import Moment from 'moment'
import browserHistory from 'react-router/lib/browserHistory'
import web from './web'
import * as utils from './utils'
import storage from 'local-storage-fallback'
import { minioBrowserPrefix } from './constants'
export const SET_WEB = 'SET_WEB'
export const SET_CURRENT_BUCKET = 'SET_CURRENT_BUCKET'
export const SET_CURRENT_PATH = 'SET_CURRENT_PATH'
@ -311,6 +314,8 @@ export const selectPrefix = prefix => {
}))
dispatch(setLoadBucket(''))
dispatch(setLoadPath(''))
// Use browserHistory.replace instead of push so that browser back button works fine.
browserHistory.replace(`${minioBrowserPrefix}/login`)
})
}
}

Loading…
Cancel
Save