Allow non-admin users to list, add, delete own external accounts.
Created by: artemruts
Description
Since we plan to enable to sign-ins with external accounts (GitHub/GitLab) to non-admin users, we should allow non-admin users to query their external accounts and list them under Account security
page.
We also allow non-admin users to add
and delete
external accounts.
Right now the following query fails for non-admin users:
query MinExternalAccounts($user: ID) {
site {
externalAccounts(user: $user) {
nodes {
id
serviceID
serviceType
accountData
}
}
}
}
Error message:
{"errors":[{"message":"must be site admin","path":["site","externalAccounts"]}],"data":null}