diff options
author | dr scofield (aka dirk husemann) | 2009-10-02 11:10:52 +0200 |
---|---|---|
committer | dr scofield (aka dirk husemann) | 2009-10-02 11:31:30 +0200 |
commit | 2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7 (patch) | |
tree | 74913862b829b7e56994f2c33ca5fe35638baad1 /OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.zip opensim-SC_OLD-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.gz opensim-SC_OLD-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.bz2 opensim-SC_OLD-2107b67f1b145f7718fdb1450be1a7b8dd1a0bf7.tar.xz |
- cleaning up LandData/ILandObject capitalization issues
- adding LandDataSerializer to OAR mechanics
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index a9e0b7f..040d0a3 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -569,7 +569,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
569 | 569 | ||
570 | // Users should be able to edit what is over their land. | 570 | // Users should be able to edit what is over their land. |
571 | ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); | 571 | ILandObject parcel = m_scene.LandChannel.GetLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); |
572 | if (parcel != null && parcel.landData.OwnerID == user && m_ParcelOwnerIsGod) | 572 | if (parcel != null && parcel.LandData.OwnerID == user && m_ParcelOwnerIsGod) |
573 | { | 573 | { |
574 | // Admin objects should not be editable by the above | 574 | // Admin objects should not be editable by the above |
575 | if (!IsAdministrator(objectOwner)) | 575 | if (!IsAdministrator(objectOwner)) |
@@ -672,7 +672,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
672 | 672 | ||
673 | // Users should be able to edit what is over their land. | 673 | // Users should be able to edit what is over their land. |
674 | ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); | 674 | ILandObject parcel = m_scene.LandChannel.GetLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); |
675 | if ((parcel != null) && (parcel.landData.OwnerID == currentUser)) | 675 | if ((parcel != null) && (parcel.LandData.OwnerID == currentUser)) |
676 | { | 676 | { |
677 | permission = true; | 677 | permission = true; |
678 | } | 678 | } |
@@ -740,12 +740,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
740 | { | 740 | { |
741 | bool permission = false; | 741 | bool permission = false; |
742 | 742 | ||
743 | if (parcel.landData.OwnerID == user) | 743 | if (parcel.LandData.OwnerID == user) |
744 | { | 744 | { |
745 | permission = true; | 745 | permission = true; |
746 | } | 746 | } |
747 | 747 | ||
748 | if ((parcel.landData.GroupID != UUID.Zero) && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) | 748 | if ((parcel.LandData.GroupID != UUID.Zero) && IsGroupMember(parcel.LandData.GroupID, user, groupPowers)) |
749 | { | 749 | { |
750 | permission = true; | 750 | permission = true; |
751 | } | 751 | } |
@@ -767,12 +767,12 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
767 | { | 767 | { |
768 | bool permission = false; | 768 | bool permission = false; |
769 | 769 | ||
770 | if (parcel.landData.OwnerID == user) | 770 | if (parcel.LandData.OwnerID == user) |
771 | { | 771 | { |
772 | permission = true; | 772 | permission = true; |
773 | } | 773 | } |
774 | 774 | ||
775 | if (parcel.landData.IsGroupOwned && IsGroupMember(parcel.landData.GroupID, user, groupPowers)) | 775 | if (parcel.LandData.IsGroupOwned && IsGroupMember(parcel.LandData.GroupID, user, groupPowers)) |
776 | { | 776 | { |
777 | permission = true; | 777 | permission = true; |
778 | } | 778 | } |
@@ -820,13 +820,13 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
820 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 820 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
821 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 821 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
822 | 822 | ||
823 | if (parcel.landData.OwnerID != user) // Only the owner can deed! | 823 | if (parcel.LandData.OwnerID != user) // Only the owner can deed! |
824 | return false; | 824 | return false; |
825 | 825 | ||
826 | ScenePresence sp = scene.GetScenePresence(user); | 826 | ScenePresence sp = scene.GetScenePresence(user); |
827 | IClientAPI client = sp.ControllingClient; | 827 | IClientAPI client = sp.ControllingClient; |
828 | 828 | ||
829 | if ((client.GetGroupPowers(parcel.landData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) | 829 | if ((client.GetGroupPowers(parcel.LandData.GroupID) & (ulong)GroupPowers.LandDeed) == 0) |
830 | return false; | 830 | return false; |
831 | 831 | ||
832 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); | 832 | return GenericParcelOwnerPermission(user, parcel, (ulong)GroupPowers.LandDeed); |
@@ -1189,7 +1189,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1189 | return false; | 1189 | return false; |
1190 | } | 1190 | } |
1191 | 1191 | ||
1192 | if ((land.landData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0) | 1192 | if ((land.LandData.Flags & ((int)ParcelFlags.AllowAPrimitiveEntry)) != 0) |
1193 | { | 1193 | { |
1194 | return true; | 1194 | return true; |
1195 | } | 1195 | } |
@@ -1233,7 +1233,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1233 | ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); | 1233 | ILandObject land = m_scene.LandChannel.GetLandObject(objectPosition.X, objectPosition.Y); |
1234 | if (land == null) return false; | 1234 | if (land == null) return false; |
1235 | 1235 | ||
1236 | if ((land.landData.Flags & ((int)ParcelFlags.CreateObjects)) == | 1236 | if ((land.LandData.Flags & ((int)ParcelFlags.CreateObjects)) == |
1237 | (int)ParcelFlags.CreateObjects) | 1237 | (int)ParcelFlags.CreateObjects) |
1238 | permission = true; | 1238 | permission = true; |
1239 | 1239 | ||
@@ -1360,7 +1360,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1360 | return false; | 1360 | return false; |
1361 | 1361 | ||
1362 | // Others allowed to terraform? | 1362 | // Others allowed to terraform? |
1363 | if ((parcel.landData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0) | 1363 | if ((parcel.LandData.Flags & ((int)ParcelFlags.AllowTerraform)) != 0) |
1364 | return true; | 1364 | return true; |
1365 | 1365 | ||
1366 | // Land owner can terraform too | 1366 | // Land owner can terraform too |
@@ -1693,27 +1693,27 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1693 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1693 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1694 | 1694 | ||
1695 | long powers = 0; | 1695 | long powers = 0; |
1696 | if (parcel.landData.GroupID != UUID.Zero) | 1696 | if (parcel.LandData.GroupID != UUID.Zero) |
1697 | client.GetGroupPowers(parcel.landData.GroupID); | 1697 | client.GetGroupPowers(parcel.LandData.GroupID); |
1698 | 1698 | ||
1699 | switch (type) | 1699 | switch (type) |
1700 | { | 1700 | { |
1701 | case (uint)ObjectReturnType.Owner: | 1701 | case (uint)ObjectReturnType.Owner: |
1702 | // Don't let group members return owner's objects, ever | 1702 | // Don't let group members return owner's objects, ever |
1703 | // | 1703 | // |
1704 | if (parcel.landData.IsGroupOwned) | 1704 | if (parcel.LandData.IsGroupOwned) |
1705 | { | 1705 | { |
1706 | if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) | 1706 | if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) |
1707 | return true; | 1707 | return true; |
1708 | } | 1708 | } |
1709 | else | 1709 | else |
1710 | { | 1710 | { |
1711 | if (parcel.landData.OwnerID != client.AgentId) | 1711 | if (parcel.LandData.OwnerID != client.AgentId) |
1712 | return false; | 1712 | return false; |
1713 | } | 1713 | } |
1714 | return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned); | 1714 | return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned); |
1715 | case (uint)ObjectReturnType.Group: | 1715 | case (uint)ObjectReturnType.Group: |
1716 | if (parcel.landData.OwnerID != client.AgentId) | 1716 | if (parcel.LandData.OwnerID != client.AgentId) |
1717 | { | 1717 | { |
1718 | // If permissionis granted through a group... | 1718 | // If permissionis granted through a group... |
1719 | // | 1719 | // |