CR feedback

This commit is contained in:
Zach Fox 2019-05-13 14:11:34 -07:00
parent d53b528994
commit 55138ed088
2 changed files with 701 additions and 703 deletions

File diff suppressed because it is too large Load diff

View file

@ -1871,21 +1871,19 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c
}
}
if (!properties.getPrivateUserData().isEmpty() && validEditPacket) {
if (!senderNode->getCanGetAndSetPrivateUserData()) {
if (wantEditLogging()) {
qCDebug(entities) << "User [" << senderNode->getUUID()
<< "] is attempting to set private user data but user isn't allowed; edit rejected...";
}
if (!properties.getPrivateUserData().isEmpty() && validEditPacket && !senderNode->getCanGetAndSetPrivateUserData()) {
if (wantEditLogging()) {
qCDebug(entities) << "User [" << senderNode->getUUID()
<< "] is attempting to set private user data but user isn't allowed; edit rejected...";
}
// If this was an add, we also want to tell the client that sent this edit that the entity was not added.
if (isAdd) {
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
_recentlyDeletedEntityItemIDs.insert(usecTimestampNow(), entityItemID);
validEditPacket = false;
} else {
suppressDisallowedPrivateUserData = true;
}
// If this was an add, we also want to tell the client that sent this edit that the entity was not added.
if (isAdd) {
QWriteLocker locker(&_recentlyDeletedEntitiesLock);
_recentlyDeletedEntityItemIDs.insert(usecTimestampNow(), entityItemID);
validEditPacket = false;
} else {
suppressDisallowedPrivateUserData = true;
}
}