Add a check for script reset permissions to the permissions module
0.6.1-post-fixes
Melanie Thielker 2008-12-01 03:40:41 +00:00
parent ddf765f840
commit 6c86823803
1 changed files with 10 additions and 0 deletions

View File

@ -217,6 +217,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
m_scene.Permissions.AddEditObjectInventoryHandler(CanEditObjectInventory);//MAYBE FULLY IMPLEMENTED
m_scene.Permissions.AddCanCopyObjectInventoryHandler(CanCopyObjectInventory); //NOT YET IMPLEMENTED
m_scene.Permissions.AddCanDeleteObjectInventoryHandler(CanDeleteObjectInventory); //NOT YET IMPLEMENTED
m_scene.Permissions.AddResetScriptHandler(CanResetScript);
m_scene.Permissions.AddCanCreateUserInventoryHandler(CanCreateUserInventory); //NOT YET IMPLEMENTED
m_scene.Permissions.AddCanCopyUserInventoryHandler(CanCopyUserInventory); //NOT YET IMPLEMENTED
@ -1427,5 +1428,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
return true;
}
private bool CanResetScript(UUID prim, UUID script, UUID agentID, Scene scene)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
// You can reset the scripts in any object you can edit
return GenericObjectPermission(agentID, prim, false);
}
}
}