Skip to content

Commit

Permalink
fix: pending analysts should not be allowed on user/profile page
Browse files Browse the repository at this point in the history
They will be redirected to their landing page
We don't have a test IDIR so we can't have an e2e test for this
  • Loading branch information
matthieu-foucault committed Jul 14, 2020
1 parent 16c9455 commit dc9ab4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/pages/user/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import {graphql} from 'react-relay';
import {profileQueryResponse} from 'profileQuery.graphql';
import DefaultLayout from 'layouts/default-layout';
import UserProfileContainer from 'containers/User/UserProfile';
import {INCENTIVE_ANALYST, ADMIN_GROUP, USER} from 'data/group-constants';

const ALLOWED_GROUPS = [INCENTIVE_ANALYST, ...ADMIN_GROUP, USER];
interface Props {
query: profileQueryResponse['query'];
}
Expand All @@ -25,7 +27,7 @@ class Profile extends Component<Props> {
const {session} = this.props.query;

return (
<DefaultLayout session={session}>
<DefaultLayout session={session} allowedGroups={ALLOWED_GROUPS}>
<UserProfileContainer user={session ? session.ciipUserBySub : null} />
</DefaultLayout>
);
Expand Down

0 comments on commit dc9ab4a

Please sign in to comment.