                      'X-Parse-Session-Token': user1.getSessionToken(),
                    },
                  },
                });

                let foundGraphQLClassReadPreference = false;
                let foundUserClassReadPreference = false;
                databaseAdapter.database.serverConfig.cursor.calls
                  .all()
                  .forEach((call) => {
                    if (
                      call.args[0].ns.collection.indexOf('GraphQLClass') >= 0
                    ) {
                      foundGraphQLClassReadPreference = true;
                      expect(call.args[0].options.readPreference.mode).toBe(
                        ReadPreference.PRIMARY
                      );
                    } else if (
                      call.args[0].ns.collection.indexOf('_User') >= 0
                    ) {
                      foundUserClassReadPreference = true;
                      expect(call.args[0].options.readPreference.mode).toBe(
                        ReadPreference.PRIMARY
                      );
                    }
                  });

                expect(foundGraphQLClassReadPreference).toBe(true);
                expect(foundUserClassReadPreference).toBe(true);
              } catch (e) {
                handleError(e);
              }
            });
The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions.