mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-30 14:22:56 +02:00
keep localhost line from being added every save. added some debugging print stuff
This commit is contained in:
parent
83cba2dd82
commit
d010dc9699
4 changed files with 33 additions and 2 deletions
|
@ -169,6 +169,10 @@ SharedNodePointer DomainGatekeeper::processAssignmentConnectRequest(const NodeCo
|
||||||
userPerms.canAdjustLocks = true;
|
userPerms.canAdjustLocks = true;
|
||||||
userPerms.canRezPermanentEntities = true;
|
userPerms.canRezPermanentEntities = true;
|
||||||
newNode->setPermissions(userPerms);
|
newNode->setPermissions(userPerms);
|
||||||
|
|
||||||
|
qDebug() << "----------------------------";
|
||||||
|
qDebug() << "AC perms are" << userPerms;
|
||||||
|
|
||||||
return newNode;
|
return newNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ void DomainServerSettingsManager::unpackPermissions() {
|
||||||
foreach (QVariant permsHash, *permissionsList) {
|
foreach (QVariant permsHash, *permissionsList) {
|
||||||
AgentPermissionsPointer perms { new AgentPermissions(permsHash.toMap()) };
|
AgentPermissionsPointer perms { new AgentPermissions(permsHash.toMap()) };
|
||||||
QString id = perms->getID();
|
QString id = perms->getID();
|
||||||
foundLoggedIn |= (id == "localhost");
|
foundLocalhost |= (id == "localhost");
|
||||||
foundAnonymous |= (id == "anonymous");
|
foundAnonymous |= (id == "anonymous");
|
||||||
foundLoggedIn |= (id == "logged-in");
|
foundLoggedIn |= (id == "logged-in");
|
||||||
_agentPermissions[id] = perms;
|
_agentPermissions[id] = perms;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
|
#include <QtCore/QDebug>
|
||||||
#include "AgentPermissions.h"
|
#include "AgentPermissions.h"
|
||||||
|
|
||||||
AgentPermissions& AgentPermissions::operator|=(const AgentPermissions& rhs) {
|
AgentPermissions& AgentPermissions::operator|=(const AgentPermissions& rhs) {
|
||||||
|
@ -41,3 +42,27 @@ QDataStream& operator>>(QDataStream& in, AgentPermissions& perms) {
|
||||||
in >> perms.canConnectPastMaxCapacity;
|
in >> perms.canConnectPastMaxCapacity;
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug debug, const AgentPermissions& perms) {
|
||||||
|
debug.nospace() << "[permissions: " << perms.getID() << " --";
|
||||||
|
if (perms.canConnectToDomain) {
|
||||||
|
debug << " connect";
|
||||||
|
}
|
||||||
|
if (perms.canAdjustLocks) {
|
||||||
|
debug << " locks";
|
||||||
|
}
|
||||||
|
if (perms.canRezPermanentEntities) {
|
||||||
|
debug << " rez";
|
||||||
|
}
|
||||||
|
if (perms.canRezTemporaryEntities) {
|
||||||
|
debug << " rez-tmp";
|
||||||
|
}
|
||||||
|
if (perms.canWriteToAssetServer) {
|
||||||
|
debug << " asset-server";
|
||||||
|
}
|
||||||
|
if (perms.canConnectPastMaxCapacity) {
|
||||||
|
debug << " ignore-max-cap";
|
||||||
|
}
|
||||||
|
debug.nospace() << "]";
|
||||||
|
return debug.nospace();
|
||||||
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
canConnectPastMaxCapacity = perms["id_can_connect_past_max_capacity"].toBool();
|
canConnectPastMaxCapacity = perms["id_can_connect_past_max_capacity"].toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getID() { return _id; }
|
QString getID() const { return _id; }
|
||||||
|
|
||||||
// the initializations here should match the defaults in describe-settings.json
|
// the initializations here should match the defaults in describe-settings.json
|
||||||
bool canConnectToDomain { true };
|
bool canConnectToDomain { true };
|
||||||
|
@ -76,4 +76,6 @@ protected:
|
||||||
|
|
||||||
const AgentPermissions DEFAULT_AGENT_PERMISSIONS;
|
const AgentPermissions DEFAULT_AGENT_PERMISSIONS;
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug debug, const AgentPermissions& node);
|
||||||
|
|
||||||
#endif // hifi_AgentPermissions_h
|
#endif // hifi_AgentPermissions_h
|
||||||
|
|
Loading…
Reference in a new issue