diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index d5dcdddf6a..478833ea70 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -122,6 +122,17 @@ namespace OpenSim.Region.Framework.Interfaces
///
/// Check if the caller has permission to manipulate the given NPC.
///
+ ///
+ /// A caller has permission if
+ /// * An NPC exists with the given npcID.
+ /// * The caller UUID given is UUID.Zero.
+ /// * The avatar is unowned (owner is UUID.Zero).
+ /// * The avatar is owned and the owner and callerID match.
+ /// * The avatar is owned and the callerID matches its agentID.
+ ///
+ ///
+ ///
+ /// true if they do, false if they don't.
///
///
///
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 95e59ab38e..b834619d2c 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -441,13 +441,20 @@ namespace OpenSim.Region.OptionalModules.World.NPC
///
/// Check if the caller has permission to manipulate the given NPC.
///
+ ///
+ /// A caller has permission if
+ /// * The caller UUID given is UUID.Zero.
+ /// * The avatar is unowned (owner is UUID.Zero).
+ /// * The avatar is owned and the owner and callerID match.
+ /// * The avatar is owned and the callerID matches its agentID.
+ ///
///
///
/// true if they do, false if they don't.
private bool CheckPermissions(NPCAvatar av, UUID callerID)
{
return callerID == UUID.Zero || av.OwnerID == UUID.Zero ||
- av.OwnerID == callerID;
+ av.OwnerID == callerID || av.AgentId == callerID;
}
}
}
\ No newline at end of file