Get basics working

This commit is contained in:
David Rowe 2020-07-25 16:22:52 +12:00
parent 9bb913983d
commit 82252cdc08
3 changed files with 6 additions and 4 deletions

View file

@ -514,7 +514,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
nodeConnection.machineFingerprint);
if (!userPerms.can(NodePermissions::Permission::canConnectToDomain)) {
if (domainHasLogin() && !domainUsername.isEmpty()) {
if (domainHasLogin()) {
sendConnectionDeniedPacket("You lack the required permissions to connect to this domain.",
nodeConnection.senderSockAddr, DomainHandler::ConnectionRefusedReason::NotAuthorizedDomain);
} else {

View file

@ -221,6 +221,8 @@ void DomainHandler::setURLAndID(QUrl domainURL, QUuid domainID) {
QString previousHost = _domainURL.host();
_domainURL = domainURL;
_hasCheckedForDomainAccessToken = false;
if (previousHost != domainURL.host()) {
qCDebug(networking) << "Updated domain hostname to" << domainURL.host();

View file

@ -486,10 +486,10 @@ void NodeList::sendDomainServerCheckIn() {
// ####### If get into difficulties, could perhaps send domain's username and signature instead of metaverse.
bool domainLoginIsConnected = false;
if (!domainLoginIsConnected) {
if (true) {
if (false) { // ####### For testing, false causes user to be considered "not logged in".
packetStream << QString("a@b.c");
if (true) {
packetStream << QString("signature");
if (true) { // ####### For testing, false is unhandled at this stage.
packetStream << QString("signature"); // #######: Consider "logged in" if this is sent during testing.
}
}
}