diff options
author | UbitUmarov | 2017-04-28 20:03:44 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-28 20:03:44 +0100 |
commit | ba4e13ef55c378db13b6aa97316e99d651762a02 (patch) | |
tree | 42aa4a07f6447cb02f7205f6b3bfd86878037d75 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |
parent | add a usefull taint and update (diff) | |
download | opensim-SC-ba4e13ef55c378db13b6aa97316e99d651762a02.zip opensim-SC-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.gz opensim-SC-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.bz2 opensim-SC-ba4e13ef55c378db13b6aa97316e99d651762a02.tar.xz |
a few changes to permissions folding... we are testing. at this point only use master for TESTING also
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 081281e..42f47b5 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -326,7 +326,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
326 | // aux | 326 | // aux |
327 | const uint allmask = (uint)PermissionMask.AllEffective; | 327 | const uint allmask = (uint)PermissionMask.AllEffective; |
328 | const uint movemodmask = (uint)(PermissionMask.Move | PermissionMask.Modify); | 328 | const uint movemodmask = (uint)(PermissionMask.Move | PermissionMask.Modify); |
329 | const uint copytransfermast = (uint)(PermissionMask.Copy | PermissionMask.Transfer); | 329 | const uint copytransfermask = (uint)(PermissionMask.Copy | PermissionMask.Transfer); |
330 | 330 | ||
331 | uint basePerms = (RootPart.BaseMask & allmask) | (uint)PermissionMask.Move; | 331 | uint basePerms = (RootPart.BaseMask & allmask) | (uint)PermissionMask.Move; |
332 | bool noBaseTransfer = (basePerms & (uint)PermissionMask.Transfer) == 0; | 332 | bool noBaseTransfer = (basePerms & (uint)PermissionMask.Transfer) == 0; |
@@ -350,7 +350,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
350 | // recover modify and move | 350 | // recover modify and move |
351 | rootOwnerPerms &= movemodmask; | 351 | rootOwnerPerms &= movemodmask; |
352 | owner |= rootOwnerPerms; | 352 | owner |= rootOwnerPerms; |
353 | if((owner & copytransfermast) == 0) | 353 | if((owner & copytransfermask) == 0) |
354 | owner |= (uint)PermissionMask.Transfer; | 354 | owner |= (uint)PermissionMask.Transfer; |
355 | 355 | ||
356 | owner &= basePerms; | 356 | owner &= basePerms; |
@@ -479,17 +479,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
479 | } | 479 | } |
480 | } | 480 | } |
481 | 481 | ||
482 | public uint GetEffectivePermissions() | ||
483 | { | ||
484 | return GetEffectivePermissions(false); | ||
485 | } | ||
486 | |||
487 | public uint GetEffectivePermissions(bool useBase) | 482 | public uint GetEffectivePermissions(bool useBase) |
488 | { | 483 | { |
489 | uint perms=(uint)(PermissionMask.Modify | | 484 | uint perms=(uint)(PermissionMask.Modify | |
490 | PermissionMask.Copy | | 485 | PermissionMask.Copy | |
491 | PermissionMask.Move | | 486 | PermissionMask.Move | |
492 | PermissionMask.Transfer) | 7; | 487 | PermissionMask.Transfer | |
488 | PermissionMask.FoldedMask); | ||
493 | 489 | ||
494 | uint ownerMask = 0x7fffffff; | 490 | uint ownerMask = 0x7fffffff; |
495 | 491 | ||
@@ -512,17 +508,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
512 | perms &= ~(uint)PermissionMask.Copy; | 508 | perms &= ~(uint)PermissionMask.Copy; |
513 | if ((ownerMask & (uint)PermissionMask.Transfer) == 0) | 509 | if ((ownerMask & (uint)PermissionMask.Transfer) == 0) |
514 | perms &= ~(uint)PermissionMask.Transfer; | 510 | perms &= ~(uint)PermissionMask.Transfer; |
515 | 511 | if ((ownerMask & (uint)PermissionMask.Export) == 0) | |
516 | // If root prim permissions are applied here, this would screw | 512 | perms &= ~(uint)PermissionMask.Export; |
517 | // with in-inventory manipulation of the next owner perms | ||
518 | // in a major way. So, let's move this to the give itself. | ||
519 | // Yes. I know. Evil. | ||
520 | // if ((ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Modify) == 0) | ||
521 | // perms &= ~((uint)PermissionMask.Modify >> 13); | ||
522 | // if ((ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Copy) == 0) | ||
523 | // perms &= ~((uint)PermissionMask.Copy >> 13); | ||
524 | // if ((ownerMask & RootPart.NextOwnerMask & (uint)PermissionMask.Transfer) == 0) | ||
525 | // perms &= ~((uint)PermissionMask.Transfer >> 13); | ||
526 | 513 | ||
527 | return perms; | 514 | return perms; |
528 | } | 515 | } |