Create CanEditObjectInventory to preserve the ability

to have different permissions on inventory and object
edits. This may be needed by the viewer on public grids
This commit is contained in:
Melanie Thielker
2008-09-22 12:52:56 +00:00
parent 7def786ef4
commit d7a98925ce
3 changed files with 49 additions and 26 deletions

View File

@@ -343,6 +343,33 @@ namespace OpenSim.Region.Environment.Scenes
return true;
}
public delegate bool CanEditObjectInventory(UUID objectID, UUID editorID, Scene scene);
private List<CanEditObjectInventory> CanEditObjectInventoryCheckFunctions = new List<CanEditObjectInventory>();
public void addCheckEditObjectInventory(CanEditObjectInventory delegateFunc)
{
if (!CanEditObjectInventoryCheckFunctions.Contains(delegateFunc))
CanEditObjectInventoryCheckFunctions.Add(delegateFunc);
}
public void removeCheckEditObjectInventory(CanEditObjectInventory delegateFunc)
{
if (CanEditObjectInventoryCheckFunctions.Contains(delegateFunc))
CanEditObjectInventoryCheckFunctions.Remove(delegateFunc);
}
public bool ExternalChecksCanEditObjectInventory(UUID objectID, UUID editorID)
{
foreach (CanEditObjectInventory check in CanEditObjectInventoryCheckFunctions)
{
if (check(objectID, editorID, m_scene) == false)
{
return false;
}
}
return true;
}
#endregion
#region MOVE OBJECT