fix EffectiveGroupOrEveryOnePerms C&T == 0 case

httptests
UbitUmarov 2017-01-16 19:49:07 +00:00
parent ffa6c7aae2
commit 6735d3496c
1 changed files with 27 additions and 5 deletions

View File

@ -277,6 +277,7 @@ namespace OpenSim.Region.Framework.Scenes
} }
} }
private uint m_EffectiveGroupOrEveryOnePerms;
public uint EffectiveGroupOrEveryOnePerms public uint EffectiveGroupOrEveryOnePerms
{ {
get get
@ -285,7 +286,7 @@ namespace OpenSim.Region.Framework.Scenes
// bc this is on heavy duty code paths // bc this is on heavy duty code paths
// but for now we need to test the concept // but for now we need to test the concept
AggregateDeepPerms(); AggregateDeepPerms();
return m_EffectiveEveryOnePerms | m_EffectiveGroupPerms; return m_EffectiveGroupOrEveryOnePerms;
} }
} }
@ -339,18 +340,28 @@ namespace OpenSim.Region.Framework.Scenes
// recover modify and move // recover modify and move
baseGroupPerms &= movemodmask; baseGroupPerms &= movemodmask;
group |= baseGroupPerms; group |= baseGroupPerms;
group &= allmask;
uint groupOrEveryone = group;
if((group & copytransfermast) == 0) if((group & copytransfermast) == 0)
group |= (uint)PermissionMask.Transfer; group |= (uint)PermissionMask.Transfer;
group &= allmask;
m_EffectiveGroupPerms = group; m_EffectiveGroupPerms = group;
// recover move // recover move
baseEveryonePerms &= (uint)PermissionMask.Move; baseEveryonePerms &= (uint)PermissionMask.Move;
everyone |= baseEveryonePerms; everyone |= baseEveryonePerms;
everyone &= allmask;
groupOrEveryone |= everyone;
if((everyone & copytransfermast) == 0) // not much sense but as sl if((everyone & copytransfermast) == 0) // not much sense but as sl
everyone |= (uint)PermissionMask.Transfer; everyone |= (uint)PermissionMask.Transfer;
everyone &= allmask;
m_EffectiveEveryOnePerms = everyone; m_EffectiveEveryOnePerms = everyone;
if((groupOrEveryone & copytransfermast) == 0) // not much sense but as sl
groupOrEveryone |= (uint)PermissionMask.Transfer;
m_EffectiveGroupOrEveryOnePerms = groupOrEveryone;
} }
} }
@ -375,6 +386,7 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < parts.Length; i++) for (int i = 0; i < parts.Length; i++)
{ {
SceneObjectPart part = parts[i]; SceneObjectPart part = parts[i];
part.AggregateInnerPerms();
owner &= part.AggregatedInnerOwnerPerms; owner &= part.AggregatedInnerOwnerPerms;
group &= part.AggregatedInnerGroupPerms; group &= part.AggregatedInnerGroupPerms;
everyone &= part.AggregatedInnerEveryonePerms; everyone &= part.AggregatedInnerEveryonePerms;
@ -390,18 +402,28 @@ namespace OpenSim.Region.Framework.Scenes
// recover modify and move // recover modify and move
baseGroupPerms &= movemodmask; baseGroupPerms &= movemodmask;
group |= baseGroupPerms; group |= baseGroupPerms;
group &= allmask;
uint groupOrEveryone = group;
if((group & copytransfermast) == 0) if((group & copytransfermast) == 0)
group |= (uint)PermissionMask.Transfer; group |= (uint)PermissionMask.Transfer;
group &= allmask;
m_EffectiveGroupPerms = group; m_EffectiveGroupPerms = group;
// recover move // recover move
baseEveryonePerms &= (uint)PermissionMask.Move; baseEveryonePerms &= (uint)PermissionMask.Move;
everyone |= baseEveryonePerms; everyone |= baseEveryonePerms;
everyone &= allmask;
groupOrEveryone |= everyone;
if((everyone & copytransfermast) == 0) // not much sense but as sl if((everyone & copytransfermast) == 0) // not much sense but as sl
everyone |= (uint)PermissionMask.Transfer; everyone |= (uint)PermissionMask.Transfer;
everyone &= allmask;
m_EffectiveEveryOnePerms = everyone; m_EffectiveEveryOnePerms = everyone;
if((groupOrEveryone & copytransfermast) == 0) // not much sense but as sl
groupOrEveryone |= (uint)PermissionMask.Transfer;
m_EffectiveGroupOrEveryOnePerms = groupOrEveryone;
} }
} }