Change some lookups in he Land Management module to make group permissions

work better. Add a generic group permissions hoot to the scene permissions
system.
viewer-2-initial-appearance
Melanie 2010-12-13 20:28:14 +00:00
parent a4588befb7
commit d6803e6448
1 changed files with 18 additions and 1 deletions

View File

@ -68,6 +68,7 @@ namespace OpenSim.Region.Framework.Scenes
public delegate bool IsGodHandler(UUID user, Scene requestFromScene);
public delegate bool IsAdministratorHandler(UUID user);
public delegate bool EditParcelHandler(UUID user, ILandObject parcel, Scene scene);
public delegate bool EditParcelPropertiesHandler(UUID user, ILandObject parcel, GroupPowers p, Scene scene);
public delegate bool SellParcelHandler(UUID user, ILandObject parcel, Scene scene);
public delegate bool AbandonParcelHandler(UUID user, ILandObject parcel, Scene scene);
public delegate bool ReclaimParcelHandler(UUID user, ILandObject parcel, Scene scene);
@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Scenes
public event IsGodHandler OnIsGod;
public event IsAdministratorHandler OnIsAdministrator;
public event EditParcelHandler OnEditParcel;
public event EditParcelPropertiesHandler OnEditParcelProperties;
public event SellParcelHandler OnSellParcel;
public event AbandonParcelHandler OnAbandonParcel;
public event ReclaimParcelHandler OnReclaimParcel;
@ -734,6 +736,21 @@ namespace OpenSim.Region.Framework.Scenes
}
return true;
}
public bool CanEditParcelProperties(UUID user, ILandObject parcel, GroupPowers p)
{
EditParcelPropertiesHandler handler = OnEditParcelProperties;
if (handler != null)
{
Delegate[] list = handler.GetInvocationList();
foreach (EditParcelPropertiesHandler h in list)
{
if (h(user, parcel, p, m_scene) == false)
return false;
}
}
return true;
}
#endregion
#region SELL PARCEL
@ -1043,4 +1060,4 @@ namespace OpenSim.Region.Framework.Scenes
return true;
}
}
}
}