Pass the first name and last name from the agent circuit data to the authorization service rather than from the account.

This is to accomodate situations where the authorization service is being used by the hypergrid, where visitors have no user account.
See http://opensimulator.org/mantis/view.php?id=5517, this code is somewhat adapted/cleaned up from Michelle's patch
I'm a little ambivalent about this since visitors could put anything in firstname/lastname so it's not much of an auth measure.
It's up to the auth service to decide which data it actually uses.
Possibly we should be passing through other info such as agent circuit ip
This commit is contained in:
Justin Clark-Casey (justincc)
2011-07-23 03:46:55 +01:00
parent ea58aee338
commit 504de8bc47
7 changed files with 50 additions and 37 deletions

View File

@@ -61,7 +61,7 @@ namespace OpenSim.Server.Handlers.Authorization
AuthorizationRequest Authorization = (AuthorizationRequest) xs.Deserialize(request);
string message = String.Empty;
bool authorized = m_AuthorizationService.IsAuthorizedForRegion(Authorization.ID, Authorization.RegionID,out message);
bool authorized = m_AuthorizationService.IsAuthorizedForRegion(Authorization.ID, Authorization.FirstName, Authorization.SurName, Authorization.RegionID, out message);
AuthorizationResponse result = new AuthorizationResponse(authorized, Authorization.ID + " has been authorized");