mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:00:44 +02:00
Use case-insensitive matching on friends lists in DomainGatekeeper
This commit is contained in:
parent
a5919ee3fa
commit
abda0b2381
1 changed files with 2 additions and 2 deletions
|
@ -207,7 +207,7 @@ NodePermissions DomainGatekeeper::setPermissionsForUser(bool isLocalUser, QStrin
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// if this user is a friend of the domain-owner, give them friend's permissions
|
// if this user is a friend of the domain-owner, give them friend's permissions
|
||||||
if (_domainOwnerFriends.contains(verifiedUsername)) {
|
if (_domainOwnerFriends.contains(verifiedUsername.toLower())) {
|
||||||
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameFriends);
|
userPerms |= _server->_settingsManager.getStandardPermissionsForName(NodePermissions::standardNameFriends);
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
qDebug() << "| user-permissions: user is friends with domain-owner, so:" << userPerms;
|
qDebug() << "| user-permissions: user is friends with domain-owner, so:" << userPerms;
|
||||||
|
@ -993,7 +993,7 @@ void DomainGatekeeper::getDomainOwnerFriendsListJSONCallback(QNetworkReply* requ
|
||||||
_domainOwnerFriends.clear();
|
_domainOwnerFriends.clear();
|
||||||
QJsonArray friends = jsonObject["data"].toObject()["friends"].toArray();
|
QJsonArray friends = jsonObject["data"].toObject()["friends"].toArray();
|
||||||
for (int i = 0; i < friends.size(); i++) {
|
for (int i = 0; i < friends.size(); i++) {
|
||||||
_domainOwnerFriends += friends.at(i).toString();
|
_domainOwnerFriends += friends.at(i).toString().toLower();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "getDomainOwnerFriendsList api call returned:" << QJsonDocument(jsonObject).toJson(QJsonDocument::Compact);
|
qDebug() << "getDomainOwnerFriendsList api call returned:" << QJsonDocument(jsonObject).toJson(QJsonDocument::Compact);
|
||||||
|
|
Loading…
Reference in a new issue