diff options
author | Rob Smart | 2009-09-16 13:34:14 +0100 |
---|---|---|
committer | Diva Canto | 2009-09-16 10:04:07 -0700 |
commit | 281ad1251ced13931ddbf99671841ef87db6ec0a (patch) | |
tree | aed4bf91859eb5722e93bb795774f59003129c30 /OpenSim/Services | |
parent | Database interface tot the new region store (diff) | |
download | opensim-SC-281ad1251ced13931ddbf99671841ef87db6ec0a.zip opensim-SC-281ad1251ced13931ddbf99671841ef87db6ec0a.tar.gz opensim-SC-281ad1251ced13931ddbf99671841ef87db6ec0a.tar.bz2 opensim-SC-281ad1251ced13931ddbf99671841ef87db6ec0a.tar.xz |
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
Diffstat (limited to 'OpenSim/Services')
3 files changed, 6 insertions, 3 deletions
diff --git a/OpenSim/Services/AuthorizationService/AuthorizationService.cs b/OpenSim/Services/AuthorizationService/AuthorizationService.cs index c795ba0..d658368 100644 --- a/OpenSim/Services/AuthorizationService/AuthorizationService.cs +++ b/OpenSim/Services/AuthorizationService/AuthorizationService.cs | |||
@@ -48,8 +48,9 @@ namespace OpenSim.Services.AuthorizationService | |||
48 | m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled"); | 48 | m_log.Info("[AUTHORIZATION CONNECTOR]: Local Authorization service enabled"); |
49 | } | 49 | } |
50 | 50 | ||
51 | public bool IsAuthorizedForRegion(string userID, string regionID) | 51 | public bool IsAuthorizedForRegion(string userID, string regionID, out string message) |
52 | { | 52 | { |
53 | message = "Authorized"; | ||
53 | return true; | 54 | return true; |
54 | } | 55 | } |
55 | } | 56 | } |
diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs index 98309f1..3167352 100644 --- a/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServiceConnector.cs | |||
@@ -88,7 +88,7 @@ namespace OpenSim.Services.Connectors | |||
88 | m_ResponseOnFailure = responseOnFailure; | 88 | m_ResponseOnFailure = responseOnFailure; |
89 | } | 89 | } |
90 | 90 | ||
91 | public bool IsAuthorizedForRegion(string userID, string firstname, string surname, string email, string regionName, string regionID) | 91 | public bool IsAuthorizedForRegion(string userID, string firstname, string surname, string email, string regionName, string regionID, out string message) |
92 | { | 92 | { |
93 | // do a remote call to the authorization server specified in the AuthorizationServerURI | 93 | // do a remote call to the authorization server specified in the AuthorizationServerURI |
94 | m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); | 94 | m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); |
@@ -105,10 +105,12 @@ namespace OpenSim.Services.Connectors | |||
105 | catch (Exception e) | 105 | catch (Exception e) |
106 | { | 106 | { |
107 | m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); | 107 | m_log.WarnFormat("[AUTHORIZATION CONNECTOR]: Unable to send authorize {0} for region {1} error thrown during comms with remote server. Reason: {2}", userID, regionID, e.Message); |
108 | message=""; | ||
108 | return m_ResponseOnFailure; | 109 | return m_ResponseOnFailure; |
109 | } | 110 | } |
110 | 111 | ||
111 | m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message); | 112 | m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message); |
113 | message = response.Message; | ||
112 | 114 | ||
113 | return response.IsAuthorized; | 115 | return response.IsAuthorized; |
114 | } | 116 | } |
diff --git a/OpenSim/Services/Interfaces/IAuthorizationService.cs b/OpenSim/Services/Interfaces/IAuthorizationService.cs index 91afa9a..c5d577a 100644 --- a/OpenSim/Services/Interfaces/IAuthorizationService.cs +++ b/OpenSim/Services/Interfaces/IAuthorizationService.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Services.Interfaces | |||
40 | // This method returns a simple true false indicating | 40 | // This method returns a simple true false indicating |
41 | // whether or not a user has access to the region | 41 | // whether or not a user has access to the region |
42 | // | 42 | // |
43 | bool IsAuthorizedForRegion(string userID, string regionID); | 43 | bool IsAuthorizedForRegion(string userID, string regionID, out string message); |
44 | 44 | ||
45 | } | 45 | } |
46 | 46 | ||