diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs')
-rw-r--r-- | OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs index cbcd137..6e350b9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs | |||
@@ -28,12 +28,15 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using OpenMetaverse; | ||
32 | using OpenSim.Region.Framework.Scenes; | ||
31 | 33 | ||
32 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 34 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
33 | { | 35 | { |
34 | class SecurityCredential : ISecurityCredential | 36 | class SecurityCredential : ISecurityCredential |
35 | { | 37 | { |
36 | private readonly ISocialEntity m_owner; | 38 | private readonly ISocialEntity m_owner; |
39 | private readonly Scene m_scene; | ||
37 | 40 | ||
38 | public SecurityCredential(ISocialEntity m_owner) | 41 | public SecurityCredential(ISocialEntity m_owner) |
39 | { | 42 | { |
@@ -44,5 +47,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
44 | { | 47 | { |
45 | get { return m_owner; } | 48 | get { return m_owner; } |
46 | } | 49 | } |
50 | |||
51 | public bool CanEditObject(IObject target) | ||
52 | { | ||
53 | return m_scene.Permissions.CanEditObject(target.GlobalID, m_owner.GlobalID); | ||
54 | } | ||
55 | |||
56 | public bool CanEditTerrain(int x, int y) | ||
57 | { | ||
58 | return m_scene.Permissions.CanTerraformLand(m_owner.GlobalID, new Vector3(x, y, 0)); | ||
59 | } | ||
47 | } | 60 | } |
48 | } | 61 | } |