* Rename all the previous methods to be User rather than Avatar (for extra bonus points)

public bool ExternalChecksCanCreateUserInventory(int invType, UUID userID)
public bool ExternalChecksCanCopyUserInventory(UUID itemID, UUID userID)
public bool ExternalChecksCanCopyUserInventory(UUID itemID, UUID userID)
public bool ExternalChecksCanDeleteUserInventory(UUID itemID, UUID userID)
0.6.1-post-fixes
Justin Clarke Casey 2008-11-13 20:52:06 +00:00
parent bd61b946df
commit 1fd32a5ab2
3 changed files with 53 additions and 53 deletions

View File

@ -186,10 +186,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanCreateAvatarInventory(CanCreateAvatarInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanCreateUserInventory(CanCreateUserInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanCopyAvatarInventory(CanCopyAvatarInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanCopyUserInventory(CanCopyUserInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanEditAvatarInventory(CanEditAvatarInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanEditUserInventory(CanEditUserInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanDeleteAvatarInventory(CanDeleteAvatarInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanDeleteUserInventory(CanDeleteUserInventory); //NOT YET IMPLEMENTED
m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED
//Register Debug Commands //Register Debug Commands
@ -1244,7 +1244,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
/// <param name="invType"></param> /// <param name="invType"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool CanCreateAvatarInventory(int invType, UUID userID) public bool CanCreateUserInventory(int invType, UUID userID)
{ {
//m_log.Debug("[PERMISSIONS]: CanCreateAvatarInventory called"); //m_log.Debug("[PERMISSIONS]: CanCreateAvatarInventory called");
@ -1260,7 +1260,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool CanCopyAvatarInventory(UUID itemID, UUID userID) public bool CanCopyUserInventory(UUID itemID, UUID userID)
{ {
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
@ -1274,7 +1274,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool CanEditAvatarInventory(UUID itemID, UUID userID) public bool CanEditUserInventory(UUID itemID, UUID userID)
{ {
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;
@ -1288,7 +1288,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool CanDeleteAvatarInventory(UUID itemID, UUID userID) public bool CanDeleteUserInventory(UUID itemID, UUID userID)
{ {
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue; if (m_bypassPermissions) return m_bypassPermissionsValue;

View File

@ -761,7 +761,7 @@ namespace OpenSim.Region.Environment.Scenes
{ {
m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID); m_log.DebugFormat("[AGENT INVENTORY]: Received request to create inventory item {0} in folder {1}", name, folderID);
if (!ExternalChecks.ExternalChecksCanCreateAvatarInventory(invType, remoteClient.AgentId)) if (!ExternalChecks.ExternalChecksCanCreateUserInventory(invType, remoteClient.AgentId))
return; return;
if (transactionID == UUID.Zero) if (transactionID == UUID.Zero)

View File

@ -1164,20 +1164,20 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
public delegate bool CanCreateAvatarInventory(int invType, UUID userID); public delegate bool CanCreateUserInventory(int invType, UUID userID);
private List<CanCreateAvatarInventory> CanCreateAvatarInventoryCheckFunctions private List<CanCreateUserInventory> CanCreateUserInventoryCheckFunctions
= new List<CanCreateAvatarInventory>(); = new List<CanCreateUserInventory>();
public void addCheckCanCreateAvatarInventory(CanCreateAvatarInventory delegateFunc) public void addCheckCanCreateUserInventory(CanCreateUserInventory delegateFunc)
{ {
if (!CanCreateAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (!CanCreateUserInventoryCheckFunctions.Contains(delegateFunc))
CanCreateAvatarInventoryCheckFunctions.Add(delegateFunc); CanCreateUserInventoryCheckFunctions.Add(delegateFunc);
} }
public void removeCheckCanCreateAvatarInventory(CanCreateAvatarInventory delegateFunc) public void removeCheckCanCreateUserInventory(CanCreateUserInventory delegateFunc)
{ {
if (CanCreateAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (CanCreateUserInventoryCheckFunctions.Contains(delegateFunc))
CanCreateAvatarInventoryCheckFunctions.Remove(delegateFunc); CanCreateUserInventoryCheckFunctions.Remove(delegateFunc);
} }
/// <summary> /// <summary>
@ -1186,9 +1186,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="invType"></param> /// <param name="invType"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool ExternalChecksCanCreateAvatarInventory(int invType, UUID userID) public bool ExternalChecksCanCreateUserInventory(int invType, UUID userID)
{ {
foreach (CanCreateAvatarInventory check in CanCreateAvatarInventoryCheckFunctions) foreach (CanCreateUserInventory check in CanCreateUserInventoryCheckFunctions)
{ {
if (check(invType, userID) == false) if (check(invType, userID) == false)
{ {
@ -1199,20 +1199,20 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
public delegate bool CanEditAvatarInventory(UUID itemID, UUID userID); public delegate bool CanEditUserInventory(UUID itemID, UUID userID);
private List<CanEditAvatarInventory> CanEditAvatarInventoryCheckFunctions private List<CanEditUserInventory> CanEditUserInventoryCheckFunctions
= new List<CanEditAvatarInventory>(); = new List<CanEditUserInventory>();
public void addCheckCanEditAvatarInventory(CanEditAvatarInventory delegateFunc) public void addCheckCanEditUserInventory(CanEditUserInventory delegateFunc)
{ {
if (!CanEditAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (!CanEditUserInventoryCheckFunctions.Contains(delegateFunc))
CanEditAvatarInventoryCheckFunctions.Add(delegateFunc); CanEditUserInventoryCheckFunctions.Add(delegateFunc);
} }
public void removeCheckCanEditAvatarInventory(CanEditAvatarInventory delegateFunc) public void removeCheckCanEditUserInventory(CanEditUserInventory delegateFunc)
{ {
if (CanEditAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (CanEditUserInventoryCheckFunctions.Contains(delegateFunc))
CanEditAvatarInventoryCheckFunctions.Remove(delegateFunc); CanEditUserInventoryCheckFunctions.Remove(delegateFunc);
} }
/// <summary> /// <summary>
@ -1221,9 +1221,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool ExternalChecksCanEditAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanEditUserInventory(UUID itemID, UUID userID)
{ {
foreach (CanEditAvatarInventory check in CanEditAvatarInventoryCheckFunctions) foreach (CanEditUserInventory check in CanEditUserInventoryCheckFunctions)
{ {
if (check(itemID, userID) == false) if (check(itemID, userID) == false)
{ {
@ -1234,20 +1234,20 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
public delegate bool CanCopyAvatarInventory(UUID itemID, UUID userID); public delegate bool CanCopyUserInventory(UUID itemID, UUID userID);
private List<CanCopyAvatarInventory> CanCopyAvatarInventoryCheckFunctions private List<CanCopyUserInventory> CanCopyUserInventoryCheckFunctions
= new List<CanCopyAvatarInventory>(); = new List<CanCopyUserInventory>();
public void addCheckCanCopyAvatarInventory(CanCopyAvatarInventory delegateFunc) public void addCheckCanCopyUserInventory(CanCopyUserInventory delegateFunc)
{ {
if (!CanCopyAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (!CanCopyUserInventoryCheckFunctions.Contains(delegateFunc))
CanCopyAvatarInventoryCheckFunctions.Add(delegateFunc); CanCopyUserInventoryCheckFunctions.Add(delegateFunc);
} }
public void removeCheckCanCopyAvatarInventory(CanCopyAvatarInventory delegateFunc) public void removeCheckCanCopyUserInventory(CanCopyUserInventory delegateFunc)
{ {
if (CanCopyAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (CanCopyUserInventoryCheckFunctions.Contains(delegateFunc))
CanCopyAvatarInventoryCheckFunctions.Remove(delegateFunc); CanCopyUserInventoryCheckFunctions.Remove(delegateFunc);
} }
/// <summary> /// <summary>
@ -1256,9 +1256,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool ExternalChecksCanCopyAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanCopyUserInventory(UUID itemID, UUID userID)
{ {
foreach (CanCopyAvatarInventory check in CanCopyAvatarInventoryCheckFunctions) foreach (CanCopyUserInventory check in CanCopyUserInventoryCheckFunctions)
{ {
if (check(itemID, userID) == false) if (check(itemID, userID) == false)
{ {
@ -1269,20 +1269,20 @@ namespace OpenSim.Region.Environment.Scenes
return true; return true;
} }
public delegate bool CanDeleteAvatarInventory(UUID itemID, UUID userID); public delegate bool CanDeleteUserInventory(UUID itemID, UUID userID);
private List<CanDeleteAvatarInventory> CanDeleteAvatarInventoryCheckFunctions private List<CanDeleteUserInventory> CanDeleteUserInventoryCheckFunctions
= new List<CanDeleteAvatarInventory>(); = new List<CanDeleteUserInventory>();
public void addCheckCanDeleteAvatarInventory(CanDeleteAvatarInventory delegateFunc) public void addCheckCanDeleteUserInventory(CanDeleteUserInventory delegateFunc)
{ {
if (!CanDeleteAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (!CanDeleteUserInventoryCheckFunctions.Contains(delegateFunc))
CanDeleteAvatarInventoryCheckFunctions.Add(delegateFunc); CanDeleteUserInventoryCheckFunctions.Add(delegateFunc);
} }
public void removeCheckCanDeleteAvatarInventory(CanDeleteAvatarInventory delegateFunc) public void removeCheckCanDeleteUserInventory(CanDeleteUserInventory delegateFunc)
{ {
if (CanDeleteAvatarInventoryCheckFunctions.Contains(delegateFunc)) if (CanDeleteUserInventoryCheckFunctions.Contains(delegateFunc))
CanDeleteAvatarInventoryCheckFunctions.Remove(delegateFunc); CanDeleteUserInventoryCheckFunctions.Remove(delegateFunc);
} }
/// <summary> /// <summary>
@ -1291,9 +1291,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="itemID"></param> /// <param name="itemID"></param>
/// <param name="userID"></param> /// <param name="userID"></param>
/// <returns></returns> /// <returns></returns>
public bool ExternalChecksCanDeleteAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanDeleteUserInventory(UUID itemID, UUID userID)
{ {
foreach (CanDeleteAvatarInventory check in CanDeleteAvatarInventoryCheckFunctions) foreach (CanDeleteUserInventory check in CanDeleteUserInventoryCheckFunctions)
{ {
if (check(itemID, userID) == false) if (check(itemID, userID) == false)
{ {