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:

  1. To access MongoDB, run the following command.

    For Server versions using MongoDB 5.x and earlier (legacy mongo shell):

    kubectl exec mongodb-0 -n <namespace> -it -- bash -c 'mongo --quiet mongodb://${MONGODB_USERNAME}:${MONGODB_ROOT_PASSWORD}@localhost/circle_ghe?authSource=${MONGODB_DATABASE}'

    For Server versions using MongoDB 6.x and later (mongosh):

    kubectl exec mongodb-0 -n <namespace> -it -- bash -c 'mongosh --quiet mongodb://${MONGODB_USERNAME}:${MONGODB_ROOT_PASSWORD}@localhost/circle_ghe?authSource=${MONGODB_DATABASE}'
  2. After successfully connecting, run the following commands and look for the user that you were unable to approve:

    db.identities.find({ "external-info.login": "username" }).pretty()
    db.users.find({ "login": "username" })
  3. Search for the username and take note of the external-id of the user. You will find output similar to the following:

    "external-id" : 10137,
    "external-info" : {
        "name" : "ACCOUNT NAME",
        "login" : "username",
        ...
    },
  4. Run the following commands to delete the user:

    db.users.deleteOne({ "login": "username" })
    db.identities.deleteOne({ "external-id": 10137 }) // Replace the external-id with the value from the previous step.
  5. Finally, ask the user to sign up again, and you should be able to approve the user.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.