fix right to change permissions of group owned taskitems

httptests
UbitUmarov 2017-05-03 19:39:42 +01:00
parent fc46274732
commit 3ef583f205
1 changed files with 17 additions and 0 deletions

View File

@ -1738,7 +1738,24 @@ namespace OpenSim.Region.Framework.Scenes
// Check if we're allowed to mess with permissions // Check if we're allowed to mess with permissions
if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god if (!Permissions.IsGod(remoteClient.AgentId)) // Not a god
{ {
bool noChange;
if (remoteClient.AgentId != part.OwnerID) // Not owner 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 // Friends and group members can't change any perms
itemInfo.BasePermissions = currentItem.BasePermissions; itemInfo.BasePermissions = currentItem.BasePermissions;