From b47c0d7e51bdb4d4bfa34f0952593f94c657d19c Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 12 Jan 2012 18:14:19 +0000
Subject: refactor: Move existing npc owner checks to
NPCModule.CheckPermissions() methods and expose on interface for external
calls.
---
OpenSim/Region/Framework/Interfaces/INPCModule.cs | 8 ++++++++
1 file changed, 8 insertions(+)
(limited to 'OpenSim/Region/Framework/Interfaces')
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index cac8479..3ec1bda 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -53,6 +53,14 @@ namespace OpenSim.Region.Framework.Interfaces
bool IsNPC(UUID agentID, Scene scene);
///
+ /// Check if the caller has permission to manipulate the given NPC.
+ ///
+ ///
+ ///
+ /// true if they do, false if they don't or if there's no NPC with the given ID.
+ bool CheckPermissions(UUID npcID, UUID callerID);
+
+ ///
/// Set the appearance for an NPC.
///
///
--
cgit v1.1
From cadd645076eacd6bd0b70a665ed3f5157cd6e5d3 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Thu, 12 Jan 2012 10:22:52 -0800
Subject: Renamed one var and deleted commented code. No functional changes.
---
OpenSim/Region/Framework/Interfaces/IUserManagement.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Interfaces')
diff --git a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs
index 54dfaf4..4f62e28 100644
--- a/OpenSim/Region/Framework/Interfaces/IUserManagement.cs
+++ b/OpenSim/Region/Framework/Interfaces/IUserManagement.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
///
///
- void AddUser(UUID uuid, string firstName, string lastName, string profileURL);
+ void AddUser(UUID uuid, string firstName, string lastName, string homeURL);
bool IsLocalGridUser(UUID uuid);
}
--
cgit v1.1
From ba3491c76e2d7cc7187a025dccd782790929f0b7 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 12 Jan 2012 19:06:46 +0000
Subject: Add permissions checks for owned avatars to all other osNpc*
functions.
This is being done outside the npc module since the check is meaningless for region module callers, who can fake any id that they like.
---
OpenSim/Region/Framework/Interfaces/INPCModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Interfaces')
diff --git a/OpenSim/Region/Framework/Interfaces/INPCModule.cs b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
index 3ec1bda..c50e734 100644
--- a/OpenSim/Region/Framework/Interfaces/INPCModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/INPCModule.cs
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// The UUID of the NPC
///
/// True if the operation succeeded, false if there was no such agent or the agent was not an NPC
- bool DeleteNPC(UUID agentID, UUID CallerID, Scene scene);
+ bool DeleteNPC(UUID agentID, Scene scene);
///
/// Get the owner of a NPC
--
cgit v1.1