def authCheck(self, authToken, admin=False, mirror=False):
        self.log(3, authToken[0],
                 "entitlements=%s admin=%s mirror=%s" %(
            authToken[2], int(bool(admin)), int(bool(mirror)) ))
        if not authToken[0]:
            return False
        cu = self.db.cursor()
        try:
            groupIds = self.getAuthRoles(cu, authToken)
        except errors.InsufficientPermission:
            return False
        if len(groupIds) < 1:
            return False
        cu.execute("select canMirror, admin from UserGroups "
                   "where userGroupId in (%s)" %(
            ",".join(x % "%d" for x in groupIds)))
        hasAdmin = False
        hasMirror = False
        for mirrorBit, adminBit in cu.fetchall():
            if admin and adminBit:
                hasAdmin = True
            if mirror and (mirrorBit or adminBit):
                hasMirror = True
        admin = (not admin) or (admin and hasAdmin)
        mirror = (not mirror) or (mirror and hasMirror)
        return admin and mirror
dataset/ETHPy150Open sassoftware/conary/conary/repository/netrepos/netauth.py/NetworkAuthorization.authCheck/swapped operands of `%`