diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 5796194..e972382 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -447,10 +447,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
447 | (uint)PermissionMask.Move; | 447 | (uint)PermissionMask.Move; |
448 | uint ownerPerms = item.CurrentPermissions; | 448 | uint ownerPerms = item.CurrentPermissions; |
449 | 449 | ||
450 | // Mask the base permissions. This is a conservative | ||
451 | // approach altering only the three main perms | ||
452 | basePerms &= nextPerms; | ||
453 | |||
454 | // If this is an object, root prim perms may be more | 450 | // If this is an object, root prim perms may be more |
455 | // permissive than folded perms. Use folded perms as | 451 | // permissive than folded perms. Use folded perms as |
456 | // a mask | 452 | // a mask |
@@ -466,10 +462,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
466 | 462 | ||
467 | // Mask the owner perms to the folded perms | 463 | // Mask the owner perms to the folded perms |
468 | ownerPerms &= foldedPerms; | 464 | ownerPerms &= foldedPerms; |
465 | basePerms &= foldedPerms; | ||
469 | 466 | ||
470 | // If the root was mod, let the mask reflect that | 467 | // If the root was mod, let the mask reflect that |
468 | // We also need to adjust the base here, because | ||
469 | // we should be able to edit in-inventory perms | ||
470 | // for the root prim, if it's mod. | ||
471 | if (isRootMod) | 471 | if (isRootMod) |
472 | { | ||
472 | ownerPerms |= (uint)PermissionMask.Modify; | 473 | ownerPerms |= (uint)PermissionMask.Modify; |
474 | basePerms |= (uint)PermissionMask.Modify; | ||
475 | } | ||
473 | } | 476 | } |
474 | 477 | ||
475 | // These will be applied to the root prim at next rez. | 478 | // These will be applied to the root prim at next rez. |
@@ -477,6 +480,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
477 | // are preserved due to the above mangling | 480 | // are preserved due to the above mangling |
478 | ownerPerms &= nextPerms; | 481 | ownerPerms &= nextPerms; |
479 | 482 | ||
483 | // Mask the base permissions. This is a conservative | ||
484 | // approach altering only the three main perms | ||
485 | basePerms &= nextPerms; | ||
486 | |||
480 | // Assign to the actual item. Make sure the slam bit is | 487 | // Assign to the actual item. Make sure the slam bit is |
481 | // set, if it wasn't set before. | 488 | // set, if it wasn't set before. |
482 | itemCopy.BasePermissions = basePerms; | 489 | itemCopy.BasePermissions = basePerms; |