def _check_required_group(self):
        """
        Returns True if the group requirement (AUTH_LDAP_REQUIRE_GROUP) is
        met. Always returns True if AUTH_LDAP_REQUIRE_GROUP is None.
        """
        required_group_dn = self.settings.REQUIRE_GROUP

        if required_group_dn is not None:
            is_member = self._get_groups().is_member_of(required_group_dn)
            if not is_member:
                raise self.AuthenticationFailed("user is not a member of AUTH_LDAP_REQUIRE_GROUP")

        return True
def _check_required_group ( self ) : required_group_dn = self . settings . REQUIRE_GROUP if required_group_dn is not None : is_member = self . _get_groups ( ) . is_member_of ( required_group_dn ) if not is_member : raise self . AuthenticationFailed ( "user is not a member of AUTH_LDAP_REQUIRE_GROUP" ) return True
Returns True if the group requirement (AUTH_LDAP_REQUIRE_GROUP) is
        met. Always returns True if AUTH_LDAP_REQUIRE_GROUP is None.