diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 02b94ce..48ae39e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -944,7 +944,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
944 | group.SetGroup(m_part.GroupID, null); | 944 | group.SetGroup(m_part.GroupID, null); |
945 | 945 | ||
946 | // TODO: Remove magic number badness | 946 | // TODO: Remove magic number badness |
947 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | 947 | if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number |
948 | { | 948 | { |
949 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) | 949 | if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) |
950 | { | 950 | { |
@@ -965,7 +965,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
965 | foreach (SceneObjectPart part in partList) | 965 | foreach (SceneObjectPart part in partList) |
966 | { | 966 | { |
967 | // TODO: Remove magic number badness | 967 | // TODO: Remove magic number badness |
968 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & 16) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number | 968 | if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number |
969 | { | 969 | { |
970 | part.LastOwnerID = part.OwnerID; | 970 | part.LastOwnerID = part.OwnerID; |
971 | part.OwnerID = item.OwnerID; | 971 | part.OwnerID = item.OwnerID; |
@@ -1319,6 +1319,48 @@ namespace OpenSim.Region.Framework.Scenes | |||
1319 | } | 1319 | } |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | // reduce to minimal set | ||
1323 | public void AggregateEveryOnePerms(ref uint current) | ||
1324 | { | ||
1325 | foreach (TaskInventoryItem item in m_items.Values) | ||
1326 | { | ||
1327 | current &= item.EveryonePermissions; | ||
1328 | if(current == 0) | ||
1329 | break; | ||
1330 | } | ||
1331 | } | ||
1332 | |||
1333 | public void AggregateGroupPerms(ref uint current) | ||
1334 | { | ||
1335 | foreach (TaskInventoryItem item in m_items.Values) | ||
1336 | { | ||
1337 | current &= item.GroupPermissions; | ||
1338 | if(current == 0) | ||
1339 | break; | ||
1340 | } | ||
1341 | } | ||
1342 | |||
1343 | public void AggregateGroupOrEveryonePerms(ref uint current) | ||
1344 | { | ||
1345 | foreach (TaskInventoryItem item in m_items.Values) | ||
1346 | { | ||
1347 | current &= (item.GroupPermissions | item.EveryonePermissions); | ||
1348 | if(current == 0) | ||
1349 | break; | ||
1350 | } | ||
1351 | } | ||
1352 | |||
1353 | public void AggregateOwnerPerms(ref uint current) | ||
1354 | { | ||
1355 | foreach (TaskInventoryItem item in m_items.Values) | ||
1356 | { | ||
1357 | current &= item.CurrentPermissions; | ||
1358 | if(current == 0) | ||
1359 | break; | ||
1360 | } | ||
1361 | } | ||
1362 | |||
1363 | |||
1322 | public uint MaskEffectivePermissions() | 1364 | public uint MaskEffectivePermissions() |
1323 | { | 1365 | { |
1324 | uint mask=0x7fffffff; | 1366 | uint mask=0x7fffffff; |