Skip to content

Commit

Permalink
- Updated Kibana tab/link to only display when user is HHS AMS authen…
Browse files Browse the repository at this point in the history
…ticated

- Added environment variable to show the tab/link for dev purposes
  • Loading branch information
elipe17 committed Feb 13, 2024
1 parent 2747f65 commit d9cf794
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tdrs-frontend/.env
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ REACT_APP_DEBOUNCE_TIME=30000
# 60 seconds == 60 * 1000 == 60000
REACT_APP_EVENT_THROTTLE_TIME=60000

# Enable the Kibana tab for dev purposes.
REACT_APP_LOCAL_KIBANA=true

# Setup SCSS:
# The following makes it possible to import SASS modules
# without relative paths. Removing this will require all @imports in
Expand Down
2 changes: 2 additions & 0 deletions tdrs-frontend/src/selectors/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,6 @@ export const accountCanViewAdmin = (state) =>

export const accountCanViewKibana = (state) =>
accountStatusIsApproved(state) &&
(selectUser(state)?.email?.includes('@acf.hhs.gov') ||
process.env.REACT_APP_LOCAL_KIBANA) &&
['Developer', 'OFA System Admin'].includes(selectPrimaryUserRole(state)?.name)

0 comments on commit d9cf794

Please sign in to comment.