Skip to content

Commit

Permalink
feat(settings): skip calling graphql hooks if user does not have the …
Browse files Browse the repository at this point in the history
…right permissions (#5136)
  • Loading branch information
Aditya Radhakrishnan authored Jun 9, 2022
1 parent 01a96a0 commit f2304c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion datahub-web-react/src/app/identity/user/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ export const UserList = () => {
showSizeChanger={false}
/>
</UserPaginationContainer>
<ViewInviteTokenModal visible={isViewingInviteToken} onClose={() => setIsViewingInviteToken(false)} />
{canManageUserCredentials && (
<ViewInviteTokenModal
visible={isViewingInviteToken}
onClose={() => setIsViewingInviteToken(false)}
/>
)}
</UserContainer>
</>
);
Expand Down
1 change: 1 addition & 0 deletions datahub-web-react/src/app/settings/AccessTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const AccessTokens = () => {
data: tokensData,
refetch: tokensRefetch,
} = useListAccessTokensQuery({
skip: !canGeneratePersonalAccessTokens,
variables: {
input: {
start,
Expand Down

0 comments on commit f2304c3

Please sign in to comment.