aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authormingchen2008-05-08 19:37:57 +0000
committermingchen2008-05-08 19:37:57 +0000
commit6c71a04da8150f7948df7a43f532e525d44cc4e7 (patch)
treee9ed76fd72fa84f9aad4ff5dec66972e08e93b82 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parent* Committing an extra bit of permissions for attaching to ensure that the per... (diff)
downloadopensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.zip
opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.gz
opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.bz2
opensim-SC-6c71a04da8150f7948df7a43f532e525d44cc4e7.tar.xz
*Added all the permission checks to the sceneexternalchecks and modified permission module to follow this.
*This makes permission checking much more modular; allows restrictive and granting module to be made without modifying the existing permission module
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs12
1 files changed, 5 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index b536048..e78ad2b 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Environment.Scenes
73 remoteClient.SendInventoryItemCreateUpdate(item); 73 remoteClient.SendInventoryItemCreateUpdate(item);
74 74
75 int userlevel = 0; 75 int userlevel = 0;
76 if (Permissions.IsEstateManager(remoteClient.AgentId)) 76 if (ExternalChecks.ExternalChecksCanBeGodLike(remoteClient.AgentId))
77 { 77 {
78 userlevel = 1; 78 userlevel = 1;
79 } 79 }
@@ -988,13 +988,11 @@ namespace OpenSim.Region.Environment.Scenes
988 bool permission; 988 bool permission;
989 if (DeRezPacket.AgentBlock.Destination == 1) 989 if (DeRezPacket.AgentBlock.Destination == 1)
990 { // Take Copy 990 { // Take Copy
991 permission = Permissions.CanCopyObject(remoteClient.AgentId, 991 permission = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
992 ((SceneObjectGroup) selectedEnt).UUID);
993 } 992 }
994 else 993 else
995 { // Take 994 { // Take
996 permission = Permissions.CanDeRezObject(remoteClient.AgentId, 995 permission = ExternalChecks.ExternalChecksCanTakeObject(((SceneObjectGroup)selectedEnt).UUID, remoteClient.AgentId);
997 ((SceneObjectGroup) selectedEnt).UUID);
998 } 996 }
999 997
1000 if (permission) 998 if (permission)
@@ -1285,7 +1283,7 @@ namespace OpenSim.Region.Environment.Scenes
1285 { 1283 {
1286 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1284 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
1287 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1285 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1288 if (!Permissions.CanRezObject(remoteClient.AgentId, pos, group.Children.Count) && !attachment) 1286 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count,remoteClient.AgentId, pos) && !attachment)
1289 { 1287 {
1290 return null; 1288 return null;
1291 } 1289 }
@@ -1371,7 +1369,7 @@ namespace OpenSim.Region.Environment.Scenes
1371 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data); 1369 string xmlData = Helpers.FieldToUTF8String(rezAsset.Data);
1372 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData); 1370 SceneObjectGroup group = new SceneObjectGroup(this, m_regionHandle, xmlData);
1373 1371
1374 if (!Permissions.CanRezObject(ownerID, pos, group.Children.Count)) 1372 if (!ExternalChecks.ExternalChecksCanRezObject(group.Children.Count, ownerID, pos))
1375 { 1373 {
1376 return null; 1374 return null;
1377 } 1375 }