diff options
author | Melanie | 2010-11-25 20:34:55 +0100 |
---|---|---|
committer | Melanie | 2010-11-25 20:34:55 +0100 |
commit | ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9 (patch) | |
tree | bae269d89f90c22159946c494048293d1c6a9aa8 /OpenSim/Data | |
parent | Export the module interface for restart (diff) | |
download | opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.zip opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.gz opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.bz2 opensim-SC_OLD-ee9aca9c5270e22407c3aa4aa96c76ca92f90bb9.tar.xz |
Add the ability for gods to impersonate users. For this, bit 6 needs to be
set in the target's UserFlags and the impersonator must have UserLevel 200
or above. The user can then log in using the target's name and their own
password.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/IUserAccountData.cs | 1 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLUserAccountData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/MySQLUserAccountData.cs | 15 | ||||
-rw-r--r-- | OpenSim/Data/Null/NullUserAccountData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteUserAccountData.cs | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLiteLegacy/SQLiteUserAccountData.cs | 5 |
6 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Data/IUserAccountData.cs b/OpenSim/Data/IUserAccountData.cs index 906ba6c..bc7eda7 100644 --- a/OpenSim/Data/IUserAccountData.cs +++ b/OpenSim/Data/IUserAccountData.cs | |||
@@ -50,5 +50,6 @@ namespace OpenSim.Data | |||
50 | bool Store(UserAccountData data); | 50 | bool Store(UserAccountData data); |
51 | bool Delete(string field, string val); | 51 | bool Delete(string field, string val); |
52 | UserAccountData[] GetUsers(UUID scopeID, string query); | 52 | UserAccountData[] GetUsers(UUID scopeID, string query); |
53 | UserAccountData[] GetUsersWhere(UUID scopeID, string where); | ||
53 | } | 54 | } |
54 | } | 55 | } |
diff --git a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs index e7c8dc5..f24b441 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserAccountData.cs | |||
@@ -238,5 +238,10 @@ namespace OpenSim.Data.MSSQL | |||
238 | return DoQuery(cmd); | 238 | return DoQuery(cmd); |
239 | } | 239 | } |
240 | } | 240 | } |
241 | |||
242 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
243 | { | ||
244 | return null; | ||
245 | } | ||
241 | } | 246 | } |
242 | } | 247 | } |
diff --git a/OpenSim/Data/MySQL/MySQLUserAccountData.cs b/OpenSim/Data/MySQL/MySQLUserAccountData.cs index aa69d68..3b35222 100644 --- a/OpenSim/Data/MySQL/MySQLUserAccountData.cs +++ b/OpenSim/Data/MySQL/MySQLUserAccountData.cs | |||
@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL | |||
80 | 80 | ||
81 | return DoQuery(cmd); | 81 | return DoQuery(cmd); |
82 | } | 82 | } |
83 | |||
84 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
85 | { | ||
86 | MySqlCommand cmd = new MySqlCommand(); | ||
87 | |||
88 | if (scopeID != UUID.Zero) | ||
89 | { | ||
90 | where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")"; | ||
91 | cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString()); | ||
92 | } | ||
93 | |||
94 | cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm); | ||
95 | |||
96 | return DoQuery(cmd); | ||
97 | } | ||
83 | } | 98 | } |
84 | } | 99 | } |
diff --git a/OpenSim/Data/Null/NullUserAccountData.cs b/OpenSim/Data/Null/NullUserAccountData.cs index ede23fb..772d821 100644 --- a/OpenSim/Data/Null/NullUserAccountData.cs +++ b/OpenSim/Data/Null/NullUserAccountData.cs | |||
@@ -156,5 +156,10 @@ namespace OpenSim.Data.Null | |||
156 | 156 | ||
157 | return false; | 157 | return false; |
158 | } | 158 | } |
159 | |||
160 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
161 | { | ||
162 | return null; | ||
163 | } | ||
159 | } | 164 | } |
160 | } | 165 | } |
diff --git a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs index 7a5de50..4d580c0 100644 --- a/OpenSim/Data/SQLite/SQLiteUserAccountData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserAccountData.cs | |||
@@ -81,5 +81,10 @@ namespace OpenSim.Data.SQLite | |||
81 | 81 | ||
82 | return DoQuery(cmd); | 82 | return DoQuery(cmd); |
83 | } | 83 | } |
84 | |||
85 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
86 | { | ||
87 | return null; | ||
88 | } | ||
84 | } | 89 | } |
85 | } | 90 | } |
diff --git a/OpenSim/Data/SQLiteLegacy/SQLiteUserAccountData.cs b/OpenSim/Data/SQLiteLegacy/SQLiteUserAccountData.cs index 27553c6..41a0177 100644 --- a/OpenSim/Data/SQLiteLegacy/SQLiteUserAccountData.cs +++ b/OpenSim/Data/SQLiteLegacy/SQLiteUserAccountData.cs | |||
@@ -77,5 +77,10 @@ namespace OpenSim.Data.SQLiteLegacy | |||
77 | 77 | ||
78 | return DoQuery(cmd); | 78 | return DoQuery(cmd); |
79 | } | 79 | } |
80 | |||
81 | public UserAccountData[] GetUsersWhere(UUID scopeID, string where) | ||
82 | { | ||
83 | return null; | ||
84 | } | ||
80 | } | 85 | } |
81 | } | 86 | } |