mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:29:03 +02:00
authed username wasn't being saved in permissions, so that interface would get briefly disconnected when their permissions changed.
This commit is contained in:
parent
27c6df660c
commit
e79767a121
1 changed files with 2 additions and 4 deletions
|
@ -128,7 +128,7 @@ void DomainGatekeeper::updateNodePermissions() {
|
||||||
QList<SharedNodePointer> nodesToKill;
|
QList<SharedNodePointer> nodesToKill;
|
||||||
|
|
||||||
auto limitedNodeList = DependencyManager::get<LimitedNodeList>();
|
auto limitedNodeList = DependencyManager::get<LimitedNodeList>();
|
||||||
limitedNodeList->eachNodeBreakable([this, limitedNodeList, &nodesToKill](const SharedNodePointer& node){
|
limitedNodeList->eachNode([this, limitedNodeList, &nodesToKill](const SharedNodePointer& node){
|
||||||
QString username = node->getPermissions().getUserName();
|
QString username = node->getPermissions().getUserName();
|
||||||
NodePermissions userPerms(username);
|
NodePermissions userPerms(username);
|
||||||
|
|
||||||
|
@ -167,8 +167,6 @@ void DomainGatekeeper::updateNodePermissions() {
|
||||||
// hang up on this node
|
// hang up on this node
|
||||||
nodesToKill << node;
|
nodesToKill << node;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
foreach (auto node, nodesToKill) {
|
foreach (auto node, nodesToKill) {
|
||||||
|
@ -264,7 +262,6 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
qDebug() << "user-permissions: no username, so:" << userPerms;
|
qDebug() << "user-permissions: no username, so:" << userPerms;
|
||||||
} else if (verifyUserSignature(username, usernameSignature, nodeConnection.senderSockAddr)) {
|
} else if (verifyUserSignature(username, usernameSignature, nodeConnection.senderSockAddr)) {
|
||||||
// they are sent us a username and the signature verifies it
|
// they are sent us a username and the signature verifies it
|
||||||
userPerms.setUserName(username);
|
|
||||||
if (_server->_settingsManager.havePermissionsForName(username)) {
|
if (_server->_settingsManager.havePermissionsForName(username)) {
|
||||||
// we have specific permissions for this user.
|
// we have specific permissions for this user.
|
||||||
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
||||||
|
@ -274,6 +271,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameLoggedIn);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameLoggedIn);
|
||||||
qDebug() << "user-permissions: user is logged in, so:" << userPerms;
|
qDebug() << "user-permissions: user is logged in, so:" << userPerms;
|
||||||
}
|
}
|
||||||
|
userPerms.setUserName(username);
|
||||||
} else {
|
} else {
|
||||||
// they sent us a username, but it didn't check out
|
// they sent us a username, but it didn't check out
|
||||||
requestUserPublicKey(username);
|
requestUserPublicKey(username);
|
||||||
|
|
Loading…
Reference in a new issue