mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 04:12:46 +02:00
look for standard permissions in standard table rather than in user table
This commit is contained in:
parent
b2f63a2132
commit
7696ead012
1 changed files with 4 additions and 4 deletions
|
@ -153,12 +153,12 @@ void DomainGatekeeper::updateNodePermissions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (username.isEmpty()) {
|
if (username.isEmpty()) {
|
||||||
userPerms |= _server->_settingsManager.getPermissionsForName(NodePermissions::standardNameAnonymous);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameAnonymous);
|
||||||
} else {
|
} else {
|
||||||
if (_server->_settingsManager.havePermissionsForName(username)) {
|
if (_server->_settingsManager.havePermissionsForName(username)) {
|
||||||
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
userPerms = _server->_settingsManager.getPermissionsForName(username);
|
||||||
} else {
|
} else {
|
||||||
userPerms |= _server->_settingsManager.getPermissionsForName(NodePermissions::standardNameLoggedIn);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameLoggedIn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,7 +263,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
|
|
||||||
if (username.isEmpty()) {
|
if (username.isEmpty()) {
|
||||||
// they didn't tell us who they are
|
// they didn't tell us who they are
|
||||||
userPerms |= _server->_settingsManager.getPermissionsForName(NodePermissions::standardNameAnonymous);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameAnonymous);
|
||||||
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
|
||||||
|
@ -274,7 +274,7 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
qDebug() << "user-permissions: specific user matches, so:" << userPerms;
|
qDebug() << "user-permissions: specific user matches, so:" << userPerms;
|
||||||
} else {
|
} else {
|
||||||
// they are logged into metaverse, but we don't have specific permissions for them.
|
// they are logged into metaverse, but we don't have specific permissions for them.
|
||||||
userPerms |= _server->_settingsManager.getPermissionsForName(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;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue