mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 02:05:34 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user