From 3ef583f205910c35e7537c3d725e66629fc95a30 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 3 May 2017 19:39:42 +0100 Subject: fix right to change permissions of group owned taskitems --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index ca1e0a8..d55311e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1738,8 +1738,25 @@ namespace OpenSim.Region.Framework.Scenes // Check if we're allowed to mess with permissions if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god { + bool noChange; if (remoteClient.AgentId != part.OwnerID) // Not owner { + noChange = true; + if(itemInfo.OwnerID == UUID.Zero && itemInfo.GroupID != UUID.Zero) + { + if(remoteClient.IsGroupMember(itemInfo.GroupID)) + { + ulong powers = remoteClient.GetGroupPowers(itemInfo.GroupID); + if((powers & (ulong)GroupPowers.ObjectManipulate) != 0) + noChange = false; + } + } + } + else + noChange = false; + + if(noChange) + { // Friends and group members can't change any perms itemInfo.BasePermissions = currentItem.BasePermissions; itemInfo.EveryonePermissions = currentItem.EveryonePermissions; -- cgit v1.1