Skip to content
Snippets Groups Projects
Commit dba58f61 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Merge branch '2081-landing-entries-page-broken-for-users-not-logged-in' into 'develop'

Removed unnecessary access check on the GUI side.

Closes #2081

See merge request !1994
parents 065648f3 330396f7
No related branches found
No related tags found
1 merge request!1994Removed unnecessary access check on the GUI side.
Pipeline #214384 passed
......@@ -20,7 +20,6 @@ import PropTypes from 'prop-types'
import Quantity from '../Quantity'
import { Formula } from './properties/MaterialCard'
import { Tooltip, IconButton, Box } from '@material-ui/core'
import { useApi } from '../api'
import { EntryButton } from '../nav/Routes'
import DetailsIcon from '@material-ui/icons/ArrowForward'
import { makeStyles } from '@material-ui/core/styles'
......@@ -114,10 +113,9 @@ EntryIds.propTypes = {
data: PropTypes.object.isRequired
}
export const VisitEntryAction = React.memo(function VisitEntryAction({data, ...props}) {
const {user} = useApi()
const hide = (data.with_embargo && !user && !data.viewers.find(viewer => viewer.user_id === user.sub)) || data.process_running
if (hide) {
export const VisitEntryAction = React.memo(({data, ...props}) => {
// The visit button is hidden if the entry is still processing.
if (data.process_running) {
return null
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment