aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-08-16 21:20:45 +1000
committerAdam Frisby2009-08-16 21:20:45 +1000
commit975c49a399d2822b93496d7abea8587c9f8c7af4 (patch)
tree24521a5094bf1ef59e12a4e656671cf784ccb146 /OpenSim/Region/OptionalModules/Scripting/Minimodule/SecurityCredential.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-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.cs13
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 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenMetaverse;
5using OpenSim.Region.Framework.Scenes;
4 6
5namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 7namespace 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}