From 9324c3f110d70d44ef91c18e570cffc59d067683 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 15 Oct 2008 16:35:27 +0000 Subject: * refactor: Move error logging from GetUserDetails up to callers, since there are some circumstances in which not finding a user is not an error --- .../Modules/World/Permissions/PermissionsModule.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/World') diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs index abbf40e..b6a0c23 100644 --- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs @@ -259,6 +259,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions if (profile.UserProfile.GodLevel >= 200) return true; } + else + { + m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user); + } } return false; @@ -646,8 +650,13 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(user); + if (userInfo == null) + { + m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for edit notecard check", user); return false; + } + if (userInfo.RootFolder == null) return false; @@ -1024,8 +1033,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(user); + if (userInfo == null) + { + m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user); return false; + } if (userInfo.RootFolder == null) return false; @@ -1102,8 +1115,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions { CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(user); + if (userInfo == null) + { + m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for view notecard check", user); return false; + } if (userInfo.RootFolder == null) return false; -- cgit v1.1