示例#1
0
    def execute(self):
        for connection_id, connection in userdb.active_connections():
            if connection.type() != "ldap":
                continue

            if connection.use_ssl():
                yield ACResultOK(_("%s: Uses SSL") % connection_id)

            else:
                yield ACResultWARN(
                    _("%s: Not using SSL. Consider enabling it in the "
                      "connection settings.") % connection_id)
示例#2
0
    def execute(self) -> Iterator[ACResult]:
        for connection_id, connection in userdb.active_connections():
            if connection.type() != "ldap":
                continue

            assert isinstance(connection, ldap.LDAPUserConnector)

            if connection.use_ssl():
                yield ACResultOK(_("%s: Uses SSL") % connection_id)

            else:
                yield ACResultWARN(
                    _("%s: Not using SSL. Consider enabling it in the "
                      "connection settings.") % connection_id)
示例#3
0
 def is_relevant(self):
     return bool([
         c for _cid, c in userdb.active_connections() if c.type() == "ldap"
     ])