diff options
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 '')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 9 |
1 files changed, 3 insertions, 6 deletions
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 | ||