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/CoreModules | |
parent | Update svn properties. (diff) | |
download | opensim-SC-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.zip opensim-SC-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.tar.gz opensim-SC-664dd58cd9a8318c14fc3e3a3950c3e29cf97ba8.tar.bz2 opensim-SC-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/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index d786df8..380104d 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -184,6 +184,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
184 | m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; | 184 | m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; |
185 | m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; | 185 | m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; |
186 | m_scene.Permissions.OnDeedParcel += CanDeedParcel; | 186 | m_scene.Permissions.OnDeedParcel += CanDeedParcel; |
187 | m_scene.Permissions.OnDeedObject += CanDeedObject; | ||
187 | m_scene.Permissions.OnIsGod += IsGod; | 188 | m_scene.Permissions.OnIsGod += IsGod; |
188 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; | 189 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; |
189 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED | 190 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED |
@@ -818,6 +819,20 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
818 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); | 819 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); |
819 | } | 820 | } |
820 | 821 | ||
822 | private bool CanDeedObject(UUID user, UUID group, Scene scene) | ||
823 | { | ||
824 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | ||
825 | if (m_bypassPermissions) return m_bypassPermissionsValue; | ||
826 | |||
827 | ScenePresence sp = scene.GetScenePresence(user); | ||
828 | IClientAPI client = sp.ControllingClient; | ||
829 | |||
830 | if((client.GetGroupPowers(group) & (ulong)GroupPowers.DeedObject) == 0) | ||
831 | return false; | ||
832 | |||
833 | return true; | ||
834 | } | ||
835 | |||
821 | private bool IsGod(UUID user, Scene scene) | 836 | private bool IsGod(UUID user, Scene scene) |
822 | { | 837 | { |
823 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 838 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
@@ -846,7 +861,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
846 | 861 | ||
847 | if (part.GroupID != UUID.Zero) | 862 | if (part.GroupID != UUID.Zero) |
848 | { | 863 | { |
849 | if ((part.OwnerID == UUID.Zero) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0))) | 864 | if ((part.OwnerID == part.GroupID) && ((owner != part.LastOwnerID) || ((part.GroupMask & PERM_TRANS) == 0))) |
850 | return false; | 865 | return false; |
851 | 866 | ||
852 | if ((part.GroupMask & PERM_COPY) == 0) | 867 | if ((part.GroupMask & PERM_COPY) == 0) |