From bd61b946df3b0589b03b23780a0eb3883268220d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 13 Nov 2008 20:29:41 +0000 Subject: * Add public bool ExternalChecksCanCreateAvatarInventory(int invType, UUID userID) public bool ExternalChecksCanCopyAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanCopyAvatarInventory(UUID itemID, UUID userID) public bool ExternalChecksCanDeleteAvatarInventory(UUID itemID, UUID userID) to ExternalChecks to handle avatar inventory checks (as opposed to object inv checks). * opensim-dev e-mail to follow concerning this shortly --- .../Modules/World/Permissions/PermissionsModule.cs | 68 ++++++++++++++++++++-- 1 file changed, 64 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index 394690c..8ecea9e 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -186,7 +186,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions m_scene.ExternalChecks.addCheckCanBuyLand(CanBuyLand); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanCopyObjectInventory(CanCopyObjectInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanDeleteObjectInventory(CanDeleteObjectInventory); //NOT YET IMPLEMENTED - m_scene.ExternalChecks.addCheckCanCreateObjectInventory(CanCreateObjectInventory); //NOT YET IMPLEMENTED + m_scene.ExternalChecks.addCheckCanCreateAvatarInventory(CanCreateAvatarInventory); //NOT YET IMPLEMENTED + m_scene.ExternalChecks.addCheckCanCopyAvatarInventory(CanCopyAvatarInventory); //NOT YET IMPLEMENTED + m_scene.ExternalChecks.addCheckCanEditAvatarInventory(CanEditAvatarInventory); //NOT YET IMPLEMENTED + m_scene.ExternalChecks.addCheckCanDeleteAvatarInventory(CanDeleteAvatarInventory); //NOT YET IMPLEMENTED m_scene.ExternalChecks.addCheckCanTeleport(CanTeleport); //NOT YET IMPLEMENTED //Register Debug Commands @@ -1219,8 +1222,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions /// /// Check whether the specified user is allowed to directly create the given inventory type in a prim's - /// inventory (e.g. the New Script button in the 1.21 Linden Lab client). This permission check does not - /// apply to existing items that are being dragged in to that prim's inventory. + /// inventory (e.g. the New Script button in the 1.21 Linden Lab client). /// /// /// @@ -1228,13 +1230,71 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions /// public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID) { - m_log.Debug("[PERMISSIONS]: CanCreateInventory called"); + //m_log.Debug("[PERMISSIONS]: CanCreateObjectInventory called"); DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); if (m_bypassPermissions) return m_bypassPermissionsValue; return true; } + + /// + /// Check whether the specified user is allowed to create the given inventory type in their inventory. + /// + /// + /// + /// + public bool CanCreateAvatarInventory(int invType, UUID userID) + { + //m_log.Debug("[PERMISSIONS]: CanCreateAvatarInventory called"); + + DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); + if (m_bypassPermissions) return m_bypassPermissionsValue; + + return true; + } + + /// + /// Check whether the specified user is allowed to copy the given inventory type in their inventory. + /// + /// + /// + /// + public bool CanCopyAvatarInventory(UUID itemID, UUID userID) + { + DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); + if (m_bypassPermissions) return m_bypassPermissionsValue; + + return true; + } + + /// + /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. + /// + /// + /// + /// + public bool CanEditAvatarInventory(UUID itemID, UUID userID) + { + DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); + if (m_bypassPermissions) return m_bypassPermissionsValue; + + return true; + } + + /// + /// Check whether the specified user is allowed to delete the given inventory item from their own inventory. + /// + /// + /// + /// + public bool CanDeleteAvatarInventory(UUID itemID, UUID userID) + { + DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); + if (m_bypassPermissions) return m_bypassPermissionsValue; + + return true; + } public bool CanTeleport(UUID userID) { -- cgit v1.1