updated the IAuthorizationService interface so that a message is passed back and can be displayed at the client when an avatar is denied access to a region

This commit is contained in:
Rob Smart
2009-09-16 13:34:14 +01:00
committed by Diva Canto
parent 8622f205d7
commit 281ad1251c
7 changed files with 15 additions and 9 deletions

View File

@@ -132,9 +132,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
}
public bool IsAuthorizedForRegion(string userID, string regionID)
public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
{
return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID);
return m_AuthorizationService.IsAuthorizedForRegion(userID, regionID, out message);
}
}

View File

@@ -117,11 +117,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
}
public bool IsAuthorizedForRegion(string userID, string regionID)
public bool IsAuthorizedForRegion(string userID, string regionID, out string message)
{
m_log.InfoFormat("[REMOTE AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} for region {1}", userID, regionID);
bool isAuthorized = true;
message = String.Empty;
// get the scene this call is being made for
Scene scene = null;
@@ -140,7 +141,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Authorization
{
UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(new UUID(userID));
isAuthorized = IsAuthorizedForRegion(userID, profile.FirstName, profile.SurName,
profile.Email, scene.RegionInfo.RegionName, regionID);
profile.Email, scene.RegionInfo.RegionName, regionID, out message);
}
else
{