Make the permissions module hook CanResetScript suitable for use

0.6.1-post-fixes
Melanie Thielker 2008-12-01 03:32:48 +00:00
parent 098f16fe31
commit ddf765f840
2 changed files with 4 additions and 4 deletions

View File

@ -337,7 +337,7 @@ namespace OpenSim.Region.Environment.Scenes
if (part == null)
return;
if (Permissions.CanResetScript(itemID, remoteClient.AgentId))
if (Permissions.CanResetScript(objectID, itemID, remoteClient.AgentId))
{
EventManager.TriggerScriptReset(part.LocalId, itemID);
}

View File

@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Scenes
#endregion
#region RESET SCRIPT
public delegate bool CanResetScriptHandler(UUID script, UUID user, Scene scene);
public delegate bool CanResetScriptHandler(UUID prim, UUID script, UUID user, Scene scene);
private List<CanResetScriptHandler> CanResetScriptCheckFunctions = new List<CanResetScriptHandler>();
public void AddResetScriptHandler(CanResetScriptHandler delegateFunc)
@ -742,11 +742,11 @@ namespace OpenSim.Region.Environment.Scenes
CanResetScriptCheckFunctions.Remove(delegateFunc);
}
public bool CanResetScript(UUID script, UUID user)
public bool CanResetScript(UUID prim, UUID script, UUID user)
{
foreach (CanResetScriptHandler check in CanResetScriptCheckFunctions)
{
if (check(script, user, m_scene) == false)
if (check(prim, script, user, m_scene) == false)
{
return false;
}