change it again...
parent
90cad82405
commit
46caea6987
|
@ -33,30 +33,55 @@ namespace OpenSim.Framework
|
||||||
{
|
{
|
||||||
public delegate bool AnimationSetValidator(UUID animID);
|
public delegate bool AnimationSetValidator(UUID animID);
|
||||||
|
|
||||||
|
|
||||||
public class AnimationSet
|
public class AnimationSet
|
||||||
{
|
{
|
||||||
private readonly int m_maxAnimations = 255;
|
private readonly int m_maxAnimations = 255;
|
||||||
|
|
||||||
public const uint allowedPermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
|
public const uint createBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
|
||||||
|
public const uint createNextPermitions = (uint)PermissionMask.Modify;
|
||||||
|
|
||||||
public static uint enforcePermition(uint currentPerm)
|
public const uint allowedBasePermitions = (uint)(PermissionMask.Copy | PermissionMask.Modify);
|
||||||
{
|
public const uint allowedNextPermitions = (uint)PermissionMask.Modify;
|
||||||
return currentPerm & allowedPermitions;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void enforceItemPermitions(InventoryItemBase it)
|
public static void setCreateItemPermitions(InventoryItemBase it)
|
||||||
{
|
{
|
||||||
if (it == null)
|
if (it == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
it.BasePermissions &= allowedPermitions;
|
it.BasePermissions = createBasePermitions;
|
||||||
it.CurrentPermissions &= allowedPermitions;
|
it.CurrentPermissions = createBasePermitions;
|
||||||
// it.GroupPermissions &= allowedPermitions;
|
// it.GroupPermissions &= allowedPermitions;
|
||||||
// it.NextPermissions &= allowedPermitions;
|
it.NextPermissions = createNextPermitions;
|
||||||
|
// it.EveryOnePermissions &= allowedPermitions;
|
||||||
|
it.GroupPermissions = 0;
|
||||||
|
it.EveryOnePermissions = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void enforceItemPermitions(InventoryItemBase it, bool IsCreator)
|
||||||
|
{
|
||||||
|
if (it == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
uint bp;
|
||||||
|
uint np;
|
||||||
|
|
||||||
|
if (IsCreator)
|
||||||
|
{
|
||||||
|
bp = createBasePermitions;
|
||||||
|
np = createNextPermitions;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bp = allowedBasePermitions;
|
||||||
|
np = allowedNextPermitions;
|
||||||
|
}
|
||||||
|
|
||||||
|
it.BasePermissions &= bp;
|
||||||
|
it.CurrentPermissions &= bp;
|
||||||
|
// it.GroupPermissions &= allowedPermitions;
|
||||||
|
it.NextPermissions &= np;
|
||||||
// it.EveryOnePermissions &= allowedPermitions;
|
// it.EveryOnePermissions &= allowedPermitions;
|
||||||
it.GroupPermissions = 0;
|
it.GroupPermissions = 0;
|
||||||
it.NextPermissions = 0;
|
|
||||||
it.EveryOnePermissions = 0;
|
it.EveryOnePermissions = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ namespace OpenSim.Region.ClientStack.Linden
|
||||||
|
|
||||||
if (inType == (sbyte)CustomInventoryType.AnimationSet)
|
if (inType == (sbyte)CustomInventoryType.AnimationSet)
|
||||||
{
|
{
|
||||||
AnimationSet.enforceItemPermitions(item);
|
AnimationSet.setCreateItemPermitions(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (restrictPerms)
|
else if (restrictPerms)
|
||||||
|
|
Loading…
Reference in New Issue