From 59157d9d63c0e038ca0a619bfae1be3ed6f77677 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 30 Mar 2012 00:40:19 +0100 Subject: Add simple login test with online friends. Add IFriendsModule.GrantRights() for granting rights via a module call. Rename IFriendsModule.GetFriendPerms() -> GetRightsGrantedByFriend() to be more self-documenting and consistent with friends module terminology. Add some method doc. --- .../Region/CoreModules/World/Permissions/PermissionsModule.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Permissions') diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index ac03747..64759a7 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -487,7 +487,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return false; } - protected bool IsFriendWithPerms(UUID user,UUID objectOwner) + protected bool IsFriendWithPerms(UUID user, UUID objectOwner) { if (user == UUID.Zero) return false; @@ -495,11 +495,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (m_friendsModule == null) return false; - uint friendPerms = m_friendsModule.GetFriendPerms(user, objectOwner); - if ((friendPerms & (uint)FriendRights.CanModifyObjects) != 0) - return true; - - return false; + int friendPerms = m_friendsModule.GetRightsGrantedByFriend(user, objectOwner); + return (friendPerms & (int)FriendRights.CanModifyObjects) != 0; } protected bool IsEstateManager(UUID user) @@ -508,6 +505,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions return m_scene.RegionInfo.EstateSettings.IsEstateManager(user); } + #endregion public bool PropagatePermissions() -- cgit v1.1