mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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.
This commit is contained in:
@@ -84,9 +84,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||
{
|
||||
}
|
||||
|
||||
public List<FriendListItem> GetUserFriends(UUID agentID)
|
||||
public uint GetFriendPerms(UUID principalID, UUID friendID)
|
||||
{
|
||||
return null;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -504,13 +504,10 @@ namespace OpenSim.Region.CoreModules.World.Permissions
|
||||
if (m_friendsModule == null)
|
||||
return false;
|
||||
|
||||
List<FriendListItem> profile = m_friendsModule.GetUserFriends(user);
|
||||
uint friendPerms = m_friendsModule.GetFriendPerms(user, objectOwner);
|
||||
if ((friendPerms & (uint)FriendRights.CanModifyObjects) != 0)
|
||||
return true;
|
||||
|
||||
foreach (FriendListItem item in profile)
|
||||
{
|
||||
if (item.Friend == objectOwner && (item.FriendPerms & (uint)FriendRights.CanModifyObjects) != 0)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user