aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/PermissionManager.cs
diff options
context:
space:
mode:
authormingchen2008-03-22 23:10:22 +0000
committermingchen2008-03-22 23:10:22 +0000
commit71ca162821ac0e5aae5f91c433b91549ae6d5419 (patch)
treefa2f13c2541075aba6807fcf95364466a785bd51 /OpenSim/Region/Environment/PermissionManager.cs
parentImplements llLoopSound(), llStopSound(), and llAdjustSoundVolume(). (diff)
downloadopensim-SC_OLD-71ca162821ac0e5aae5f91c433b91549ae6d5419.zip
opensim-SC_OLD-71ca162821ac0e5aae5f91c433b91549ae6d5419.tar.gz
opensim-SC_OLD-71ca162821ac0e5aae5f91c433b91549ae6d5419.tar.bz2
opensim-SC_OLD-71ca162821ac0e5aae5f91c433b91549ae6d5419.tar.xz
*Moved LandManagement into its own region module (spiffy!)
Diffstat (limited to 'OpenSim/Region/Environment/PermissionManager.cs')
-rw-r--r--OpenSim/Region/Environment/PermissionManager.cs21
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/PermissionManager.cs b/OpenSim/Region/Environment/PermissionManager.cs
index 27ec9d1..29987d8 100644
--- a/OpenSim/Region/Environment/PermissionManager.cs
+++ b/OpenSim/Region/Environment/PermissionManager.cs
@@ -26,9 +26,8 @@
26 */ 26 */
27 27
28using libsecondlife; 28using libsecondlife;
29using OpenSim.Region.Environment.LandManagement;
30using OpenSim.Region.Environment.Scenes; 29using OpenSim.Region.Environment.Scenes;
31 30using OpenSim.Region.Environment.Interfaces;
32namespace OpenSim.Region.Environment 31namespace OpenSim.Region.Environment
33{ 32{
34 public class PermissionManager 33 public class PermissionManager
@@ -126,7 +125,7 @@ namespace OpenSim.Region.Environment
126 125
127 string reason = "Insufficient permission"; 126 string reason = "Insufficient permission";
128 127
129 Land land = m_scene.LandManager.getLandObject(position.X, position.Y); 128 ILandObject land = m_scene.LandChannel.getLandObject(position.X, position.Y);
130 if (land == null) return false; 129 if (land == null) return false;
131 130
132 if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) == 131 if ((land.landData.landFlags & ((int)Parcel.ParcelFlags.CreateObjects)) ==
@@ -230,7 +229,7 @@ namespace OpenSim.Region.Environment
230 } 229 }
231 230
232 // Users should be able to edit what is over their land. 231 // Users should be able to edit what is over their land.
233 Land parcel = m_scene.LandManager.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y); 232 ILandObject parcel = m_scene.LandChannel.getLandObject(task.AbsolutePosition.X, task.AbsolutePosition.Y);
234 if (parcel != null && parcel.landData.ownerID == user) 233 if (parcel != null && parcel.landData.ownerID == user)
235 return objectOwnerMask; 234 return objectOwnerMask;
236 235
@@ -324,7 +323,7 @@ namespace OpenSim.Region.Environment
324 } 323 }
325 324
326 // Users should be able to edit what is over their land. 325 // Users should be able to edit what is over their land.
327 Land parcel = m_scene.LandManager.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y); 326 ILandObject parcel = m_scene.LandChannel.getLandObject(group.AbsolutePosition.X, group.AbsolutePosition.Y);
328 if ((parcel != null) && (parcel.landData.ownerID == currentUser)) 327 if ((parcel != null) && (parcel.landData.ownerID == currentUser))
329 { 328 {
330 permission = true; 329 permission = true;
@@ -551,7 +550,7 @@ namespace OpenSim.Region.Environment
551 Y = 0; 550 Y = 0;
552 551
553 // Land owner can terraform too 552 // Land owner can terraform too
554 Land parcel = m_scene.LandManager.getLandObject(X, Y); 553 ILandObject parcel = m_scene.LandChannel.getLandObject(X, Y);
555 if (parcel != null && GenericParcelPermission(user, parcel)) 554 if (parcel != null && GenericParcelPermission(user, parcel))
556 permission = true; 555 permission = true;
557 556
@@ -596,7 +595,7 @@ namespace OpenSim.Region.Environment
596 595
597 #region Parcel Permissions 596 #region Parcel Permissions
598 597
599 protected virtual bool GenericParcelPermission(LLUUID user, Land parcel) 598 protected virtual bool GenericParcelPermission(LLUUID user, ILandObject parcel)
600 { 599 {
601 bool permission = false; 600 bool permission = false;
602 601
@@ -625,22 +624,22 @@ namespace OpenSim.Region.Environment
625 624
626 protected virtual bool GenericParcelPermission(LLUUID user, LLVector3 pos) 625 protected virtual bool GenericParcelPermission(LLUUID user, LLVector3 pos)
627 { 626 {
628 Land parcel = m_scene.LandManager.getLandObject(pos.X, pos.Y); 627 ILandObject parcel = m_scene.LandChannel.getLandObject(pos.X, pos.Y);
629 if (parcel == null) return false; 628 if (parcel == null) return false;
630 return GenericParcelPermission(user, parcel); 629 return GenericParcelPermission(user, parcel);
631 } 630 }
632 631
633 public virtual bool CanEditParcel(LLUUID user, Land parcel) 632 public virtual bool CanEditParcel(LLUUID user, ILandObject parcel)
634 { 633 {
635 return GenericParcelPermission(user, parcel); 634 return GenericParcelPermission(user, parcel);
636 } 635 }
637 636
638 public virtual bool CanSellParcel(LLUUID user, Land parcel) 637 public virtual bool CanSellParcel(LLUUID user, ILandObject parcel)
639 { 638 {
640 return GenericParcelPermission(user, parcel); 639 return GenericParcelPermission(user, parcel);
641 } 640 }
642 641
643 public virtual bool CanAbandonParcel(LLUUID user, Land parcel) 642 public virtual bool CanAbandonParcel(LLUUID user, ILandObject parcel)
644 { 643 {
645 return GenericParcelPermission(user, parcel); 644 return GenericParcelPermission(user, parcel);
646 } 645 }