diff options
author | Adam Frisby | 2009-08-16 21:20:45 +1000 |
---|---|---|
committer | Adam Frisby | 2009-08-16 21:20:45 +1000 |
commit | 975c49a399d2822b93496d7abea8587c9f8c7af4 (patch) | |
tree | 24521a5094bf1ef59e12a4e656671cf784ccb146 /OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-975c49a399d2822b93496d7abea8587c9f8c7af4.zip opensim-SC_OLD-975c49a399d2822b93496d7abea8587c9f8c7af4.tar.gz opensim-SC_OLD-975c49a399d2822b93496d7abea8587c9f8c7af4.tar.bz2 opensim-SC_OLD-975c49a399d2822b93496d7abea8587c9f8c7af4.tar.xz |
* [MRM] Implements permission checks on IObject implementations in SOPObject.cs. Does not implement security on IObjectInventory yet.
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 bd4440c..771bc8b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs | |||
@@ -1,12 +1,15 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenMetaverse; | ||
5 | using OpenSim.Region.Framework.Scenes; | ||
4 | 6 | ||
5 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | 7 | namespace OpenSim.Region.OptionalModules.Scripting.Minimodule |
6 | { | 8 | { |
7 | class SecurityCredential : ISecurityCredential | 9 | class SecurityCredential : ISecurityCredential |
8 | { | 10 | { |
9 | private readonly ISocialEntity m_owner; | 11 | private readonly ISocialEntity m_owner; |
12 | private readonly Scene m_scene; | ||
10 | 13 | ||
11 | public SecurityCredential(ISocialEntity m_owner) | 14 | public SecurityCredential(ISocialEntity m_owner) |
12 | { | 15 | { |
@@ -17,5 +20,15 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
17 | { | 20 | { |
18 | get { return m_owner; } | 21 | get { return m_owner; } |
19 | } | 22 | } |
23 | |||
24 | public bool CanEditObject(IObject target) | ||
25 | { | ||
26 | return m_scene.Permissions.CanEditObject(target.GlobalID, m_owner.GlobalID); | ||
27 | } | ||
28 | |||
29 | public bool CanEditTerrain(int x, int y) | ||
30 | { | ||
31 | return m_scene.Permissions.CanTerraformLand(m_owner.GlobalID, new Vector3(x, y, 0)); | ||
32 | } | ||
20 | } | 33 | } |
21 | } | 34 | } |