diff options
author | Justin Clarke Casey | 2008-10-07 14:49:12 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-07 14:49:12 +0000 |
commit | 48d86fb23f7ae0e7919274d67fc25f590e6845b1 (patch) | |
tree | efd239c7ccf4dd09a7c81fd06ebe6f1c5bf2c174 /OpenSim/Region/Environment/Modules/World/Permissions | |
parent | From: chris yeoh <yeohc@au1.ibm.com> (diff) | |
download | opensim-SC-48d86fb23f7ae0e7919274d67fc25f590e6845b1.zip opensim-SC-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.gz opensim-SC-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.bz2 opensim-SC-48d86fb23f7ae0e7919274d67fc25f590e6845b1.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=1207
* Implmements llModifyLand() and a check for the "Allow others to terraform flag"
* Thanks tglion!
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Permissions')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 16743ea..abbf40e 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs | |||
@@ -984,11 +984,9 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
984 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 984 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
985 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 985 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
986 | 986 | ||
987 | bool permission = false; | ||
988 | |||
989 | // Estate override | 987 | // Estate override |
990 | if (GenericEstatePermission(user)) | 988 | if (GenericEstatePermission(user)) |
991 | permission = true; | 989 | return true; |
992 | 990 | ||
993 | float X = position.X; | 991 | float X = position.X; |
994 | float Y = position.Y; | 992 | float Y = position.Y; |
@@ -1002,13 +1000,19 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions | |||
1002 | if (Y < 0) | 1000 | if (Y < 0) |
1003 | Y = 0; | 1001 | Y = 0; |
1004 | 1002 | ||
1005 | // Land owner can terraform too | ||
1006 | ILandObject parcel = m_scene.LandChannel.GetLandObject(X, Y); | 1003 | ILandObject parcel = m_scene.LandChannel.GetLandObject(X, Y); |
1007 | if (parcel != null && GenericParcelPermission(user, parcel)) | 1004 | if (parcel == null) |
1008 | permission = true; | 1005 | return false; |
1009 | 1006 | ||
1007 | // Others allowed to terraform? | ||
1008 | if ((parcel.landData.Flags & ((int)Parcel.ParcelFlags.AllowTerraform)) != 0) | ||
1009 | return true; | ||
1010 | 1010 | ||
1011 | return permission; | 1011 | // Land owner can terraform too |
1012 | if (parcel != null && GenericParcelPermission(user, parcel)) | ||
1013 | return true; | ||
1014 | |||
1015 | return false; | ||
1012 | } | 1016 | } |
1013 | 1017 | ||
1014 | private bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene) | 1018 | private bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene) |