Mitigating Issues with User Approval on the CircleCI Server
The server has a feature that requires the admin to approve users before they can use the CircleCI Server. However, there are instances where clicking the approve button does not function properly. This article aims to assist you in resolving this issue.
Prerequisites
The following require admin access and ability to access the cluster.
Steps to Mitigate Issues with User Approval on the CircleCI Server:
- To access the MongoDB, run the following command:
-
kubectl exec mongodb-0 -n <namespace> -it -- bash -c 'mongo --quiet mongodb://${MONGODB_USERNAME}:${MONGODB_ROOT_PASSWORD}@localhost/circle_ghe?authSource=${MONGODB_DATABASE}'
-
- After successfully connecting, run the following command and look for the user that you were unable to approve:
-
db.identities.find({ "external-info.login": "username" }).pretty()
db.users.find({ "login": "username" })
-
-
While running the above command, search for the username and take note of the external-id of the user. You will find the output as follows:
-
"external-id" : 10137,
"external-info" : {
"name" : "ACCOUNT NAME",
"login" : "username",
...
},
-
-
Run the following command to delete the user:
-
db.users.deleteOne({ "login": "username" })
db.identities.deleteOne({ "external-id": 10137 }) # Replace the external-id with the previous value.
-
-
Finally, ask the user to sign up again, and you should be able to approve the user.
Comments
Article is closed for comments.