diff options
author | UbitUmarov | 2017-06-15 04:20:32 +0100 |
---|---|---|
committer | UbitUmarov | 2017-06-15 04:20:32 +0100 |
commit | 969d5f742cc3721a4eb53125410660dd7410ce45 (patch) | |
tree | d9c02aca7f6a315e1eb0769a5dfbe53ab655a805 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |
parent | fix llsd DeserialiseOSDMap cast from boolean to int, this seems to fix alche... (diff) | |
download | opensim-SC_OLD-969d5f742cc3721a4eb53125410660dd7410ce45.zip opensim-SC_OLD-969d5f742cc3721a4eb53125410660dd7410ce45.tar.gz opensim-SC_OLD-969d5f742cc3721a4eb53125410660dd7410ce45.tar.bz2 opensim-SC_OLD-969d5f742cc3721a4eb53125410660dd7410ce45.tar.xz |
update inventory item permissions on deattach
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index cf188aa..5bca482 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -42,6 +42,7 @@ using OpenSim.Region.Framework.Interfaces; | |||
42 | using OpenSim.Region.Framework.Scenes; | 42 | using OpenSim.Region.Framework.Scenes; |
43 | using OpenSim.Region.Framework.Scenes.Serialization; | 43 | using OpenSim.Region.Framework.Scenes.Serialization; |
44 | using OpenSim.Services.Interfaces; | 44 | using OpenSim.Services.Interfaces; |
45 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
45 | 46 | ||
46 | namespace OpenSim.Region.CoreModules.Avatar.Attachments | 47 | namespace OpenSim.Region.CoreModules.Avatar.Attachments |
47 | { | 48 | { |
@@ -896,6 +897,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
896 | 897 | ||
897 | if (item != null) | 898 | if (item != null) |
898 | { | 899 | { |
900 | // attach is rez, need to update permissions | ||
901 | item.Flags &= ~(uint)(InventoryItemFlags.ObjectSlamPerm | InventoryItemFlags.ObjectOverwriteBase | | ||
902 | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | | ||
903 | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | ||
904 | |||
905 | uint permsBase = (uint)(PermissionMask.Copy | PermissionMask.Transfer | | ||
906 | PermissionMask.Modify | PermissionMask.Move | | ||
907 | PermissionMask.Export | PermissionMask.FoldedMask); | ||
908 | |||
909 | permsBase &= grp.CurrentAndFoldedNextPermissions(); | ||
910 | permsBase |= (uint)PermissionMask.Move; | ||
911 | item.BasePermissions = permsBase; | ||
912 | item.CurrentPermissions = permsBase; | ||
913 | item.NextPermissions = permsBase & grp.RootPart.NextOwnerMask | (uint)PermissionMask.Move; | ||
914 | item.EveryOnePermissions = permsBase & grp.RootPart.EveryoneMask; | ||
915 | item.GroupPermissions = permsBase & grp.RootPart.GroupMask; | ||
916 | item.CurrentPermissions &= | ||
917 | ((uint)PermissionMask.Copy | | ||
918 | (uint)PermissionMask.Transfer | | ||
919 | (uint)PermissionMask.Modify | | ||
920 | (uint)PermissionMask.Move | | ||
921 | (uint)PermissionMask.Export | | ||
922 | (uint)PermissionMask.FoldedMask); // Preserve folded permissions ?? | ||
923 | |||
899 | AssetBase asset = m_scene.CreateAsset( | 924 | AssetBase asset = m_scene.CreateAsset( |
900 | grp.GetPartName(grp.LocalId), | 925 | grp.GetPartName(grp.LocalId), |
901 | grp.GetPartDescription(grp.LocalId), | 926 | grp.GetPartDescription(grp.LocalId), |