Fix bug with entity adding w/o permission

Entities could be added to the local tree, but be rejected by the server
because of a lack of permissions.
This commit is contained in:
Zander Otavka 2016-06-24 16:34:54 -07:00
parent 2e8f6c2cc6
commit 2786061d71

View file

@ -320,6 +320,11 @@ EntityItemPointer EntityTree::addEntity(const EntityItemID& entityID, const Enti
return nullptr;
}
if (!properties.getClientOnly() && getIsClient() &&
!nodeList->getThisNodeCanRez() && !nodeList->getThisNodeCanRezTmp()) {
return nullptr;
}
bool recordCreationTime = false;
if (props.getCreated() == UNKNOWN_CREATED_TIME) {
// the entity's creation time was not specified in properties, which means this is a NEW entity