aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorUbitUmarov2017-01-19 17:45:54 +0000
committerUbitUmarov2017-01-19 17:45:54 +0000
commitd8108ab740d9a6ad782476fc43b62ec4c36b30b3 (patch)
tree6b4c53cd221ede82abc40b3eda6f0608f827f586 /OpenSim/Region/Framework/Scenes
parentadd a comment about parts permissions aggregation (diff)
downloadopensim-SC_OLD-d8108ab740d9a6ad782476fc43b62ec4c36b30b3.zip
opensim-SC_OLD-d8108ab740d9a6ad782476fc43b62ec4c36b30b3.tar.gz
opensim-SC_OLD-d8108ab740d9a6ad782476fc43b62ec4c36b30b3.tar.bz2
opensim-SC_OLD-d8108ab740d9a6ad782476fc43b62ec4c36b30b3.tar.xz
change CanDeedObject. WARNING like on other grids, if you do not set next owner rights on object and ALL ITS CONTENTS, you may loose all rights on it
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs11
2 files changed, 10 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index ad913f7..3230a2b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2717,9 +2717,6 @@ namespace OpenSim.Region.Framework.Scenes
2717 { 2717 {
2718 if (ownerID != UUID.Zero) 2718 if (ownerID != UUID.Zero)
2719 return; 2719 return;
2720
2721 if (!Permissions.CanDeedObject(remoteClient.AgentId, groupID))
2722 return;
2723 } 2720 }
2724 2721
2725 List<SceneObjectGroup> groups = new List<SceneObjectGroup>(); 2722 List<SceneObjectGroup> groups = new List<SceneObjectGroup>();
@@ -2750,15 +2747,9 @@ namespace OpenSim.Region.Framework.Scenes
2750 child.TriggerScriptChangedEvent(Changed.OWNER); 2747 child.TriggerScriptChangedEvent(Changed.OWNER);
2751 } 2748 }
2752 } 2749 }
2753 else // The object was deeded to the group 2750 else // The object deeded to the group
2754 { 2751 {
2755 if (!Permissions.IsGod(remoteClient.AgentId) && sog.OwnerID != remoteClient.AgentId) 2752 if (!Permissions.CanDeedObject(remoteClient, sog, groupID))
2756 continue;
2757
2758 if (!Permissions.CanTransferObject(sog.UUID, groupID))
2759 continue;
2760
2761 if (sog.GroupID != groupID)
2762 continue; 2753 continue;
2763 2754
2764 sog.SetOwnerId(groupID); 2755 sog.SetOwnerId(groupID);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index 3491792..a7f3dd7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes
78 public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); 78 public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
79 public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); 79 public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
80 public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene); 80 public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene);
81 public delegate bool DeedObjectHandler(UUID user, UUID group, Scene scene); 81 public delegate bool DeedObjectHandler(ScenePresence sp, SceneObjectGroup sog, UUID targetGroupID);
82 public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene); 82 public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene);
83 public delegate bool LinkObjectHandler(UUID user, UUID objectID); 83 public delegate bool LinkObjectHandler(UUID user, UUID objectID);
84 public delegate bool DelinkObjectHandler(UUID user, UUID objectID); 84 public delegate bool DelinkObjectHandler(UUID user, UUID objectID);
@@ -934,15 +934,20 @@ namespace OpenSim.Region.Framework.Scenes
934 return true; 934 return true;
935 } 935 }
936 936
937 public bool CanDeedObject(UUID user, UUID group) 937 public bool CanDeedObject(IClientAPI client, SceneObjectGroup sog, UUID targetGroupID)
938 { 938 {
939 DeedObjectHandler handler = OnDeedObject; 939 DeedObjectHandler handler = OnDeedObject;
940 if (handler != null) 940 if (handler != null)
941 { 941 {
942 if(sog == null || client == null || client.SceneAgent == null || targetGroupID == UUID.Zero)
943 return false;
944
945 ScenePresence sp = client.SceneAgent as ScenePresence;
946
942 Delegate[] list = handler.GetInvocationList(); 947 Delegate[] list = handler.GetInvocationList();
943 foreach (DeedObjectHandler h in list) 948 foreach (DeedObjectHandler h in list)
944 { 949 {
945 if (h(user, group, m_scene) == false) 950 if (h(sp, sog, targetGroupID) == false)
946 return false; 951 return false;
947 } 952 }
948 } 953 }