aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-02-21 22:54:00 +0000
committerMelanie2012-02-21 22:54:00 +0000
commit24a49011cb9ac4cec73b7440a4c0963900fab85f (patch)
tree81101f7d34139661552e3c23b046492ab2ff4b66 /OpenSim
parentReverse the changed to ODE heightmap. It results in SERIOUS issues like an (diff)
parentFix problem with dragging child part inventory item to user inventory. (diff)
downloadopensim-SC-24a49011cb9ac4cec73b7440a4c0963900fab85f.zip
opensim-SC-24a49011cb9ac4cec73b7440a4c0963900fab85f.tar.gz
opensim-SC-24a49011cb9ac4cec73b7440a4c0963900fab85f.tar.bz2
opensim-SC-24a49011cb9ac4cec73b7440a4c0963900fab85f.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs22
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs18
2 files changed, 5 insertions, 35 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index ba38488..df9bad1 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -677,18 +677,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions
677 bool permission = false; 677 bool permission = false;
678 bool locked = false; 678 bool locked = false;
679 679
680 if (!m_scene.Entities.ContainsKey(objId)) 680 SceneObjectPart part = m_scene.GetSceneObjectPart(objId);
681 {
682 return false;
683 }
684 681
685 // If it's not an object, we cant edit it. 682 if (part == null)
686 if ((!(m_scene.Entities[objId] is SceneObjectGroup)))
687 {
688 return false; 683 return false;
689 }
690 684
691 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId]; 685 SceneObjectGroup group = part.ParentGroup;
692 686
693 UUID objectOwner = group.OwnerID; 687 UUID objectOwner = group.OwnerID;
694 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 688 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
@@ -977,16 +971,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions
977 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 971 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
978 if (m_bypassPermissions) return m_bypassPermissionsValue; 972 if (m_bypassPermissions) return m_bypassPermissionsValue;
979 973
980 SceneObjectPart part = m_scene.GetSceneObjectPart(objectID);
981
982 // If we selected a sub-prim to edit, the objectID won't represent the object, but only a part.
983 // We have to check the permissions of the group, though.
984 if (part.ParentID != 0)
985 {
986 objectID = part.ParentUUID;
987 part = m_scene.GetSceneObjectPart(objectID);
988 }
989
990 return GenericObjectPermission(editorID, objectID, false); 974 return GenericObjectPermission(editorID, objectID, false);
991 } 975 }
992 976
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 6031697..7060ef4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1151,34 +1151,20 @@ namespace OpenSim.Region.Framework.Scenes
1151 return; 1151 return;
1152 } 1152 }
1153 1153
1154 UUID partUUID = part.UUID;
1155 SceneObjectGroup group = part.ParentGroup;
1156 if (group != null)
1157 partUUID = group.RootPart.UUID;
1158
1159 TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId); 1154 TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
1160 1155
1161 if (null == taskItem)
1162 {
1163 m_log.WarnFormat("[PRIM INVENTORY]: Move of inventory item {0} from prim with local id {1} failed"
1164 + " because the inventory item could not be found",
1165 itemId, primLocalId);
1166
1167 return;
1168 }
1169
1170 if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1156 if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
1171 { 1157 {
1172 // If the item to be moved is no copy, we need to be able to 1158 // If the item to be moved is no copy, we need to be able to
1173 // edit the prim. 1159 // edit the prim.
1174 if (!Permissions.CanEditObjectInventory(partUUID, remoteClient.AgentId)) 1160 if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
1175 return; 1161 return;
1176 } 1162 }
1177 else 1163 else
1178 { 1164 {
1179 // If the item is copiable, then we just need to have perms 1165 // If the item is copiable, then we just need to have perms
1180 // on it. The delete check is a pure rights check 1166 // on it. The delete check is a pure rights check
1181 if (!Permissions.CanDeleteObject(partUUID, remoteClient.AgentId)) 1167 if (!Permissions.CanDeleteObject(part.UUID, remoteClient.AgentId))
1182 return; 1168 return;
1183 } 1169 }
1184 1170