aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-17 01:25:41 +0100
committerJustin Clark-Casey (justincc)2012-04-17 01:25:41 +0100
commit24a0cc5261f1fd1a1d8779c8fb5e7d7fba98ed68 (patch)
tree3f5c985d49dac06300eb4fcfa0637e07f56fc45e /OpenSim/Framework
parentNull reference in llGetObjectMass on a seated avatar. (diff)
downloadopensim-SC_OLD-24a0cc5261f1fd1a1d8779c8fb5e7d7fba98ed68.zip
opensim-SC_OLD-24a0cc5261f1fd1a1d8779c8fb5e7d7fba98ed68.tar.gz
opensim-SC_OLD-24a0cc5261f1fd1a1d8779c8fb5e7d7fba98ed68.tar.bz2
opensim-SC_OLD-24a0cc5261f1fd1a1d8779c8fb5e7d7fba98ed68.tar.xz
refactor: Rename EstateSettings.IsEstateManager() to EstateSettings.IsEstateManagerOrOwner() to reflect what it actually does.
This makes it consistent with other parts of OpenSimulator that are treating ESTATE_MANAGER and ESTATE_OWNER as different entities. As per opensim-dev mailing list.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/EstateSettings.cs4
-rw-r--r--OpenSim/Framework/Tests/MundaneFrameworkTests.cs4
2 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs
index 98604f2..a92abbf 100644
--- a/OpenSim/Framework/EstateSettings.cs
+++ b/OpenSim/Framework/EstateSettings.cs
@@ -322,7 +322,7 @@ namespace OpenSim.Framework
322 l_EstateManagers.Remove(avatarID); 322 l_EstateManagers.Remove(avatarID);
323 } 323 }
324 324
325 public bool IsEstateManager(UUID avatarID) 325 public bool IsEstateManagerOrOwner(UUID avatarID)
326 { 326 {
327 if (IsEstateOwner(avatarID)) 327 if (IsEstateOwner(avatarID))
328 return true; 328 return true;
@@ -368,7 +368,7 @@ namespace OpenSim.Framework
368 368
369 public bool HasAccess(UUID user) 369 public bool HasAccess(UUID user)
370 { 370 {
371 if (IsEstateManager(user)) 371 if (IsEstateManagerOrOwner(user))
372 return true; 372 return true;
373 373
374 return l_EstateAccess.Contains(user); 374 return l_EstateAccess.Contains(user);
diff --git a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
index 76de6be..672847d 100644
--- a/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
+++ b/OpenSim/Framework/Tests/MundaneFrameworkTests.cs
@@ -227,10 +227,10 @@ namespace OpenSim.Framework.Tests
227 es.AddEstateManager(UUID.Zero); 227 es.AddEstateManager(UUID.Zero);
228 228
229 es.AddEstateManager(bannedUserId); 229 es.AddEstateManager(bannedUserId);
230 Assert.IsTrue(es.IsEstateManager(bannedUserId), "bannedUserId should be EstateManager but isn't."); 230 Assert.IsTrue(es.IsEstateManagerOrOwner(bannedUserId), "bannedUserId should be EstateManager but isn't.");
231 231
232 es.RemoveEstateManager(bannedUserId); 232 es.RemoveEstateManager(bannedUserId);
233 Assert.IsFalse(es.IsEstateManager(bannedUserId), "bannedUserID is estateManager but shouldn't be"); 233 Assert.IsFalse(es.IsEstateManagerOrOwner(bannedUserId), "bannedUserID is estateManager but shouldn't be");
234 234
235 Assert.IsFalse(es.HasAccess(bannedUserId), "bannedUserID has access but shouldn't"); 235 Assert.IsFalse(es.HasAccess(bannedUserId), "bannedUserID has access but shouldn't");
236 236