Skip to content

Commit

Permalink
merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonSharratt committed Feb 12, 2020
2 parents 80ef3ee + 0f2ad11 commit 6533368
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"jest-websocket-mock": "^2.0.0",
"mini-css-extract-plugin": "^0.4.4",
"mock-socket": "^9.0.2",
"node-sass": "^4.13.0",
"node-sass": "^4.13.1",
"nodemon": "^1.18.11",
"prettier": "^1.18.2",
"redux-logger": "^3.0.6",
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/modules/app/components/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ class App extends React.Component {
zone,
};

if (!hasValidGroupAccess) {
// Don't let OC's to download or invalid group access
if ((hasOcRole && exporterMode === 'download') || !hasValidGroupAccess) {
return <Unauthorized />;
}

Expand All @@ -82,7 +83,7 @@ class App extends React.Component {
el = <Reports />;
} else if (hasOcRole && !hasExporterRole) {
el = <OutputChecker {...props} />;
} else {
} else if (hasExporterRole) {
el = <Exporter {...props} />;
}
} else if (authFetchStatus === 'loaded') {
Expand Down Expand Up @@ -120,6 +121,7 @@ App.propTypes = {
initSockets: PropTypes.func.isRequired,
isAuthenticated: PropTypes.bool.isRequired,
user: PropTypes.shape({
groups: PropTypes.arrayOf(PropTypes.string),
displayName: PropTypes.string,
}).isRequired,
zone: PropTypes.string.isRequired,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/modules/reports/containers/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const mapStateToProps = state => {
}

return (
d.chronology.some(c => c.enteredState > 2) &&
d.chronology.some(c => c.enteredState > 1) &&
(requestState === 'all' || d.state === requestState)
);
})
Expand Down

0 comments on commit 6533368

Please sign in to comment.