diff options
author | Melanie Thielker | 2009-06-14 21:44:34 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-06-14 21:44:34 +0000 |
commit | 664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8 (patch) | |
tree | 41db60d59a2f0b46388e1e598679265dafc9d247 /OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |
parent | Update svn properties. (diff) | |
download | opensim-SC_OLD-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.zip opensim-SC_OLD-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.tar.gz opensim-SC_OLD-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.tar.bz2 opensim-SC_OLD-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.tar.xz |
Fixes Mantis #3793 . Committing thomax/Snoopy's patch to allow deeding of objects, with changes:
- Set OwnerID = GroupID for deeded objects.
- Close a security loophole that would have allowed a user with deed rights in a group to deed ANY object to that group, even if it's not owned by them and/or not set to that group
- Set LastOwnerID correctly. Handle objects vs. prims correctly.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index d0da618..226ec15 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -69,6 +69,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
69 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); | 69 | public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene); |
70 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); | 70 | public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene); |
71 | public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene); | 71 | public delegate bool DeedParcelHandler(UUID user, ILandObject parcel, Scene scene); |
72 | public delegate bool DeedObjectHandler(UUID user, UUID group, Scene scene); | ||
72 | public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene); | 73 | public delegate bool BuyLandHandler(UUID user, ILandObject parcel, Scene scene); |
73 | public delegate bool LinkObjectHandler(UUID user, UUID objectID); | 74 | public delegate bool LinkObjectHandler(UUID user, UUID objectID); |
74 | public delegate bool DelinkObjectHandler(UUID user, UUID objectID); | 75 | public delegate bool DelinkObjectHandler(UUID user, UUID objectID); |
@@ -127,6 +128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
127 | public event AbandonParcelHandler OnAbandonParcel; | 128 | public event AbandonParcelHandler OnAbandonParcel; |
128 | public event ReclaimParcelHandler OnReclaimParcel; | 129 | public event ReclaimParcelHandler OnReclaimParcel; |
129 | public event DeedParcelHandler OnDeedParcel; | 130 | public event DeedParcelHandler OnDeedParcel; |
131 | public event DeedObjectHandler OnDeedObject; | ||
130 | public event BuyLandHandler OnBuyLand; | 132 | public event BuyLandHandler OnBuyLand; |
131 | public event LinkObjectHandler OnLinkObject; | 133 | public event LinkObjectHandler OnLinkObject; |
132 | public event DelinkObjectHandler OnDelinkObject; | 134 | public event DelinkObjectHandler OnDelinkObject; |
@@ -735,6 +737,21 @@ namespace OpenSim.Region.Framework.Scenes | |||
735 | return true; | 737 | return true; |
736 | } | 738 | } |
737 | 739 | ||
740 | public bool CanDeedObject(UUID user, UUID group) | ||
741 | { | ||
742 | DeedObjectHandler handler = OnDeedObject; | ||
743 | if (handler != null) | ||
744 | { | ||
745 | Delegate[] list = handler.GetInvocationList(); | ||
746 | foreach (DeedObjectHandler h in list) | ||
747 | { | ||
748 | if (h(user, group, m_scene) == false) | ||
749 | return false; | ||
750 | } | ||
751 | } | ||
752 | return true; | ||
753 | } | ||
754 | |||
738 | public bool CanBuyLand(UUID user, ILandObject parcel) | 755 | public bool CanBuyLand(UUID user, ILandObject parcel) |
739 | { | 756 | { |
740 | BuyLandHandler handler = OnBuyLand; | 757 | BuyLandHandler handler = OnBuyLand; |