Permissions module: fix in prim inv CanEditNotecard group edit rights check ( in last commit plz read .. by GetObjectPermissions)

httptests
UbitUmarov 2017-01-18 01:16:58 +00:00
parent c14d81f538
commit e963789714
1 changed files with 17 additions and 3 deletions

View File

@ -1320,6 +1320,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (sog == null) if (sog == null)
return false; return false;
// check object mod right
uint perms = GetObjectPermissions(user, sog, true); uint perms = GetObjectPermissions(user, sog, true);
if((perms & (uint)PermissionMask.Modify) == 0) if((perms & (uint)PermissionMask.Modify) == 0)
return false; return false;
@ -1334,10 +1335,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions
if (ti.OwnerID != user) if (ti.OwnerID != user)
{ {
if (ti.GroupID == UUID.Zero) UUID tiGroupID = ti.GroupID;
if (tiGroupID == UUID.Zero)
return false; return false;
if (!IsGroupMember(ti.GroupID, user, 0)) ulong powers = 0;
if(!GroupMemberPowers(tiGroupID, user, ref powers))
return false;
if(tiGroupID == ti.OwnerID && (powers & (ulong)GroupPowers.ObjectManipulate) != 0)
{
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy)) ==
((uint)PermissionMask.Modify | (uint)PermissionMask.Copy))
return true;
}
if ((ti.GroupPermissions & ((uint)PermissionMask.Modify | (uint)PermissionMask.Copy)) ==
((uint)PermissionMask.Modify | (uint)PermissionMask.Copy))
return true;
return false; return false;
} }