We have 3 envs, the lowest env is a single instance and the devs run a single instance mongodb as well.
On the higher envs we use replicasets
We have a feature that uses change streams, which are reliant on the server being a replicaset. We want to toggle the feature depending on MongoDBs capabilites dynamically on startup of the application.
To run replSet.getStatus the user needs admin permissions though, which we obviously dont want.
How can we find out if the server is a replicaset without having admin permissions on the user?