diff options
author | Melanie | 2011-01-12 21:39:13 +0000 |
---|---|---|
committer | Melanie | 2011-01-12 21:39:13 +0000 |
commit | 914e4b319ee0adba72bfbfebd878827bfdfde843 (patch) | |
tree | 5e48c12157f98fe2529f9c5c7781bc18488266c8 /OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |
parent | Use ToString() rather than a cast (more robust) (diff) | |
download | opensim-SC_OLD-914e4b319ee0adba72bfbfebd878827bfdfde843.zip opensim-SC_OLD-914e4b319ee0adba72bfbfebd878827bfdfde843.tar.gz opensim-SC_OLD-914e4b319ee0adba72bfbfebd878827bfdfde843.tar.bz2 opensim-SC_OLD-914e4b319ee0adba72bfbfebd878827bfdfde843.tar.xz |
Fix direct item give permissions
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 1ebccd1..f2cc16c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -434,10 +434,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
434 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; | 434 | item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask; |
435 | item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask; | 435 | item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask; |
436 | 436 | ||
437 | // Magic number badness. Maybe this deserves an enum. | 437 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
438 | // bit 4 (16) is the "Slam" bit, it means treat as passed | ||
439 | // and apply next owner perms on rez | ||
440 | item.CurrentPermissions |= 16; // Slam! | ||
441 | } | 438 | } |
442 | else | 439 | else |
443 | { | 440 | { |
@@ -641,7 +638,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
641 | rootPart.Description = item.Description; | 638 | rootPart.Description = item.Description; |
642 | 639 | ||
643 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); | 640 | group.SetGroup(remoteClient.ActiveGroupId, remoteClient); |
644 | if ((rootPart.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0) | 641 | if ((rootPart.OwnerID != item.Owner) || |
642 | (item.CurrentPermissions & 16) != 0 || // Magic number | ||
643 | (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) | ||
645 | { | 644 | { |
646 | //Need to kill the for sale here | 645 | //Need to kill the for sale here |
647 | rootPart.ObjectSaleType = 0; | 646 | rootPart.ObjectSaleType = 0; |
@@ -651,9 +650,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
651 | { | 650 | { |
652 | foreach (SceneObjectPart part in group.Parts) | 651 | foreach (SceneObjectPart part in group.Parts) |
653 | { | 652 | { |
654 | part.EveryoneMask = item.EveryOnePermissions; | 653 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
655 | part.NextOwnerMask = item.NextPermissions; | 654 | part.EveryoneMask = item.EveryOnePermissions; |
656 | part.GroupMask = 0; // DO NOT propagate here | 655 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) |
656 | part.NextOwnerMask = item.NextPermissions; | ||
657 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
658 | part.GroupMask = item.GroupPermissions; | ||
657 | } | 659 | } |
658 | 660 | ||
659 | group.ApplyNextOwnerPermissions(); | 661 | group.ApplyNextOwnerPermissions(); |
@@ -669,8 +671,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
669 | part.Inventory.ChangeInventoryOwner(item.Owner); | 671 | part.Inventory.ChangeInventoryOwner(item.Owner); |
670 | part.GroupMask = 0; // DO NOT propagate here | 672 | part.GroupMask = 0; // DO NOT propagate here |
671 | } | 673 | } |
672 | part.EveryoneMask = item.EveryOnePermissions; | 674 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) |
673 | part.NextOwnerMask = item.NextPermissions; | 675 | part.EveryoneMask = item.EveryOnePermissions; |
676 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
677 | part.NextOwnerMask = item.NextPermissions; | ||
678 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) | ||
679 | part.GroupMask = item.GroupPermissions; | ||
674 | } | 680 | } |
675 | 681 | ||
676 | rootPart.TrimPermissions(); | 682 | rootPart.TrimPermissions(); |