aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
authormingchen2008-05-13 16:22:57 +0000
committermingchen2008-05-13 16:22:57 +0000
commit32785921d0a4a074b92da0f4ec322cf451a4642f (patch)
treeae93cc8fb09a5d7b991e323617e3324042e30a8d /OpenSim/Region/Environment/Scenes/InnerScene.cs
parent* Remove old historical grid inventory code (diff)
downloadopensim-SC-32785921d0a4a074b92da0f4ec322cf451a4642f.zip
opensim-SC-32785921d0a4a074b92da0f4ec322cf451a4642f.tar.gz
opensim-SC-32785921d0a4a074b92da0f4ec322cf451a4642f.tar.bz2
opensim-SC-32785921d0a4a074b92da0f4ec322cf451a4642f.tar.xz
*Complete redo of the permissions module
*Removed hardcoded permissions checks *Added permissions checks where needed
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs29
1 files changed, 15 insertions, 14 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 9dba398..8b9b888 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -288,8 +288,11 @@ namespace OpenSim.Region.Environment.Scenes
288 { 288 {
289 if (((SceneObjectGroup)obj).LocalId == localID) 289 if (((SceneObjectGroup)obj).LocalId == localID)
290 { 290 {
291 m_parentScene.RemoveEntity((SceneObjectGroup)obj); 291 if (m_parentScene.ExternalChecks.ExternalChecksCanDeleteObject(((SceneObjectGroup)obj).UUID, avatar_deleter))
292 m_numPrim--; 292 {
293 m_parentScene.RemoveEntity((SceneObjectGroup)obj);
294 m_numPrim--;
295 }
293 return; 296 return;
294 } 297 }
295 } 298 }
@@ -998,12 +1001,11 @@ namespace OpenSim.Region.Environment.Scenes
998 if (group != null) 1001 if (group != null)
999 { 1002 {
1000 LLVector3 oldPos = group.AbsolutePosition; 1003 LLVector3 oldPos = group.AbsolutePosition;
1001 //FIXME: ObjectEntry is not in ExternalChecks! 1004 if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment)
1002 //if (!m_parentScene.Permissions.CanObjectEntry(remoteClient.AgentId, oldPos, pos) && !group.RootPart.m_IsAttachment) 1005 {
1003 //{
1004 group.SendGroupTerseUpdate(); 1006 group.SendGroupTerseUpdate();
1005 //return; 1007 return;
1006 //} 1008 }
1007 if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(remoteClient.AgentId, group.UUID) || group.RootPart.m_IsAttachment) 1009 if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(remoteClient.AgentId, group.UUID) || group.RootPart.m_IsAttachment)
1008 { 1010 {
1009 group.UpdateSinglePosition(pos, localID); 1011 group.UpdateSinglePosition(pos, localID);
@@ -1030,12 +1032,11 @@ namespace OpenSim.Region.Environment.Scenes
1030 } 1032 }
1031 else 1033 else
1032 { 1034 {
1033 //FIXME: ObjectEntry not in ExternalChecks! 1035 if (!m_parentScene.ExternalChecks.ExternalChecksCanObjectEntry(group.UUID,pos) && !group.RootPart.m_IsAttachment)
1034 //if (!m_parentScene.Permissions.CanObjectEntry(remoteClient.AgentId, oldPos, pos) && !group.RootPart.m_IsAttachment) 1036 {
1035 //{
1036 group.SendGroupTerseUpdate(); 1037 group.SendGroupTerseUpdate();
1037 // return; 1038 return;
1038 //} 1039 }
1039 if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment) 1040 if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID, remoteClient.AgentId) || group.RootPart.m_IsAttachment)
1040 { 1041 {
1041 group.UpdateGroupPosition(pos); 1042 group.UpdateGroupPosition(pos);
@@ -1055,7 +1056,7 @@ namespace OpenSim.Region.Environment.Scenes
1055 SceneObjectGroup group = GetGroupByPrim(localID); 1056 SceneObjectGroup group = GetGroupByPrim(localID);
1056 if (group != null) 1057 if (group != null)
1057 { 1058 {
1058 if (m_parentScene.ExternalChecks.ExternalChecksCanMoveObject(group.UUID,remoteClient.AgentId)) 1059 if (m_parentScene.ExternalChecks.ExternalChecksCanEditObject(group.UUID,remoteClient.AgentId))
1059 { 1060 {
1060 group.UpdateTextureEntry(localID, texture); 1061 group.UpdateTextureEntry(localID, texture);
1061 } 1062 }
@@ -1378,7 +1379,7 @@ namespace OpenSim.Region.Environment.Scenes
1378 1379
1379 if (originPrim != null) 1380 if (originPrim != null)
1380 { 1381 {
1381 if (m_parentScene.ExternalChecks.ExternalChecksCanCopyObject(originPrim.Children.Count, originPrim.UUID, AgentID, originPrim.AbsolutePosition)) 1382 if (m_parentScene.ExternalChecks.ExternalChecksCanDuplicateObject(originPrim.Children.Count, originPrim.UUID, AgentID, originPrim.AbsolutePosition))
1382 { 1383 {
1383 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID); 1384 SceneObjectGroup copy = originPrim.Copy(AgentID, GroupID);
1384 copy.AbsolutePosition = copy.AbsolutePosition + offset; 1385 copy.AbsolutePosition = copy.AbsolutePosition + offset;