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.
This commit is contained in:
Melanie
2010-11-25 20:34:55 +01:00
parent c14592d4ba
commit ee9aca9c52
16 changed files with 138 additions and 8 deletions

View File

@@ -50,5 +50,6 @@ namespace OpenSim.Data
bool Store(UserAccountData data);
bool Delete(string field, string val);
UserAccountData[] GetUsers(UUID scopeID, string query);
UserAccountData[] GetUsersWhere(UUID scopeID, string where);
}
}

View File

@@ -238,5 +238,10 @@ namespace OpenSim.Data.MSSQL
return DoQuery(cmd);
}
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -80,5 +80,20 @@ namespace OpenSim.Data.MySQL
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
MySqlCommand cmd = new MySqlCommand();
if (scopeID != UUID.Zero)
{
where = "(ScopeID=?ScopeID or ScopeID='00000000-0000-0000-0000-000000000000') and (" + where + ")";
cmd.Parameters.AddWithValue("?ScopeID", scopeID.ToString());
}
cmd.CommandText = String.Format("select * from {0} where " + where, m_Realm);
return DoQuery(cmd);
}
}
}

View File

@@ -156,5 +156,10 @@ namespace OpenSim.Data.Null
return false;
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -81,5 +81,10 @@ namespace OpenSim.Data.SQLite
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}

View File

@@ -77,5 +77,10 @@ namespace OpenSim.Data.SQLiteLegacy
return DoQuery(cmd);
}
public UserAccountData[] GetUsersWhere(UUID scopeID, string where)
{
return null;
}
}
}