feat: implement user impersonation feature (#976)

* feat: wip impersonate user

* feat: add ability to impersonate an user

* fix: remove console.log

* fix: unused import
This commit is contained in:
Jérémy M
2023-08-01 00:47:29 +02:00
committed by GitHub
parent b028d9fd2a
commit f111440e00
24 changed files with 547 additions and 30 deletions

View File

@ -10,8 +10,10 @@ export const GET_CURRENT_USER = gql`
firstName
lastName
avatarUrl
canImpersonate
workspaceMember {
id
allowImpersonation
workspace {
id
domainName

View File

@ -28,6 +28,15 @@ export const UPDATE_USER = gql`
}
`;
export const UPDATE_ALLOW_IMPERONATION = gql`
mutation UpdateAllowImpersonation($allowImpersonation: Boolean!) {
allowImpersonation(allowImpersonation: $allowImpersonation) {
id
allowImpersonation
}
}
`;
export const UPDATE_PROFILE_PICTURE = gql`
mutation UploadProfilePicture($file: Upload!) {
uploadProfilePicture(file: $file)