aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorMelanie2010-01-19 11:33:42 +0000
committerMelanie2010-01-19 11:33:42 +0000
commit5908b8ed7c273d239642a9d31e1844f9a2392e3d (patch)
tree72c71bf6501a5d963ab4ae801c5ade29f5cdcb42 /OpenSim/Region/CoreModules
parentMerge branch 'presence-refactor' of melanie@opensimulator.org:/var/git/opensi... (diff)
downloadopensim-SC-5908b8ed7c273d239642a9d31e1844f9a2392e3d.zip
opensim-SC-5908b8ed7c273d239642a9d31e1844f9a2392e3d.tar.gz
opensim-SC-5908b8ed7c273d239642a9d31e1844f9a2392e3d.tar.bz2
opensim-SC-5908b8ed7c273d239642a9d31e1844f9a2392e3d.tar.xz
Change a member of the friendslist module to better reflect the client side
data storage paradigm of the friends list and avoid repeated, unneccessary fetches of the entire friends list.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs4
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs9
2 files changed, 5 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index 64854b2..a07b6e2 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -84,9 +84,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
84 { 84 {
85 } 85 }
86 86
87 public List<FriendListItem> GetUserFriends(UUID agentID) 87 public uint GetFriendPerms(UUID principalID, UUID friendID)
88 { 88 {
89 return null; 89 return 1;
90 } 90 }
91 } 91 }
92} 92}
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index 8fa0c65..72dd373 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -504,13 +504,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
504 if (m_friendsModule == null) 504 if (m_friendsModule == null)
505 return false; 505 return false;
506 506
507 List<FriendListItem> profile = m_friendsModule.GetUserFriends(user); 507 uint friendPerms = m_friendsModule.GetFriendPerms(user, objectOwner);
508 if ((friendPerms & (uint)FriendRights.CanModifyObjects) != 0)
509 return true;
508 510
509 foreach (FriendListItem item in profile)
510 {
511 if (item.Friend == objectOwner && (item.FriendPerms & (uint)FriendRights.CanModifyObjects) != 0)
512 return true;
513 }
514 return false; 511 return false;
515 } 512 }
516 513