diff options
author | Justin Clark-Casey (justincc) | 2011-07-23 03:46:55 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-07-23 03:48:53 +0100 |
commit | 504de8bc4792eda165d71a2c7481cb43cb92759a (patch) | |
tree | 3206f651448b2a9ef0fae5b210ae4f35d1b6730d /OpenSim/Region/Framework/Scenes | |
parent | Change default AllowScriptCrossings config setting to true. (diff) | |
download | opensim-SC_OLD-504de8bc4792eda165d71a2c7481cb43cb92759a.zip opensim-SC_OLD-504de8bc4792eda165d71a2c7481cb43cb92759a.tar.gz opensim-SC_OLD-504de8bc4792eda165d71a2c7481cb43cb92759a.tar.bz2 opensim-SC_OLD-504de8bc4792eda165d71a2c7481cb43cb92759a.tar.xz |
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
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 32a2887..1a32510 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3553,11 +3553,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3553 | 3553 | ||
3554 | if (AuthorizationService != null) | 3554 | if (AuthorizationService != null) |
3555 | { | 3555 | { |
3556 | if (!AuthorizationService.IsAuthorizedForRegion(agent.AgentID.ToString(), RegionInfo.RegionID.ToString(),out reason)) | 3556 | if (!AuthorizationService.IsAuthorizedForRegion( |
3557 | agent.AgentID.ToString(), agent.firstname, agent.lastname, RegionInfo.RegionID.ToString(), out reason)) | ||
3557 | { | 3558 | { |
3558 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", | 3559 | m_log.WarnFormat("[CONNECTION BEGIN]: Denied access to: {0} ({1} {2}) at {3} because the user does not have access to the region", |
3559 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); | 3560 | agent.AgentID, agent.firstname, agent.lastname, RegionInfo.RegionName); |
3560 | //reason = String.Format("You are not currently on the access list for {0}",RegionInfo.RegionName); | 3561 | |
3561 | return false; | 3562 | return false; |
3562 | } | 3563 | } |
3563 | } | 3564 | } |