diff options
author | Melanie Thielker | 2009-05-12 13:29:38 +0000 |
---|---|---|
committer | Melanie Thielker | 2009-05-12 13:29:38 +0000 |
commit | 32ac388363c42a069f6dbc9650c030675da36a83 (patch) | |
tree | 8091eb26c6299c3c0d6057c7265bc204c75ed0d6 /OpenSim/Region/CoreModules/World | |
parent | * Applies Mantis #3630 - Adds support for outside MRM initialisation, makes M... (diff) | |
download | opensim-SC_OLD-32ac388363c42a069f6dbc9650c030675da36a83.zip opensim-SC_OLD-32ac388363c42a069f6dbc9650c030675da36a83.tar.gz opensim-SC_OLD-32ac388363c42a069f6dbc9650c030675da36a83.tar.bz2 opensim-SC_OLD-32ac388363c42a069f6dbc9650c030675da36a83.tar.xz |
Add permission mechanisms for group deeding land
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 874e8b7..46a0da2 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -128,6 +128,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
128 | m_scene.Permissions.OnGenerateClientFlags += GenerateClientFlags; | 128 | m_scene.Permissions.OnGenerateClientFlags += GenerateClientFlags; |
129 | m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; | 129 | m_scene.Permissions.OnAbandonParcel += CanAbandonParcel; |
130 | m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; | 130 | m_scene.Permissions.OnReclaimParcel += CanReclaimParcel; |
131 | m_scene.Permissions.OnDeedParcel += CanDeedParcel; | ||
131 | m_scene.Permissions.OnIsGod += IsGod; | 132 | m_scene.Permissions.OnIsGod += IsGod; |
132 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; | 133 | m_scene.Permissions.OnDuplicateObject += CanDuplicateObject; |
133 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED | 134 | m_scene.Permissions.OnDeleteObject += CanDeleteObject; //MAYBE FULLY IMPLEMENTED |
@@ -683,6 +684,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
683 | return GenericParcelPermission(user, parcel); | 684 | return GenericParcelPermission(user, parcel); |
684 | } | 685 | } |
685 | 686 | ||
687 | private bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene) | ||
688 | { | ||
689 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | ||
690 | if (m_bypassPermissions) return m_bypassPermissionsValue; | ||
691 | |||
692 | if (parcel.landData.OwnerID != user) // Only the owner can deed! | ||
693 | return false; | ||
694 | |||
695 | ScenePresence sp = scene.GetScenePresence(user); | ||
696 | IClientAPI client = sp.ControllingClient; | ||
697 | |||
698 | if ((client.GetGroupPowers(parcel.landData.GroupID) & (long)GroupPowers.LandDeed) == 0) | ||
699 | return false; | ||
700 | |||
701 | return GenericParcelPermission(user, parcel); | ||
702 | } | ||
703 | |||
686 | private bool IsGod(UUID user, Scene scene) | 704 | private bool IsGod(UUID user, Scene scene) |
687 | { | 705 | { |
688 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 706 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |