diff options
author | UbitUmarov | 2017-01-15 16:15:40 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-15 16:15:40 +0000 |
commit | b9e2606c2ff820369659940e4aafbcb55390794a (patch) | |
tree | 3b2b92a6b7e20a5959ac93b4b5004e1c986b8fdd /OpenSim | |
parent | use of PermissionMask Bit3 for slam was a recent mistake, so make it only bit... (diff) | |
download | opensim-SC_OLD-b9e2606c2ff820369659940e4aafbcb55390794a.zip opensim-SC_OLD-b9e2606c2ff820369659940e4aafbcb55390794a.tar.gz opensim-SC_OLD-b9e2606c2ff820369659940e4aafbcb55390794a.tar.bz2 opensim-SC_OLD-b9e2606c2ff820369659940e4aafbcb55390794a.tar.xz |
add code for fixing effective permitions. This is a test, and currently too slow for prodution. just finding our way home
Diffstat (limited to 'OpenSim')
4 files changed, 252 insertions, 15 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index b60cd93..dcf0c00 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -631,7 +631,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
631 | 631 | ||
632 | #region Object Permissions | 632 | #region Object Permissions |
633 | #pragma warning disable 0612 | 633 | #pragma warning disable 0612 |
634 | const uint DEFAULT_FLAGS = (uint)~( | 634 | const uint DEFAULT_FLAGS = (uint)( |
635 | PrimFlags.ObjectCopy | // Tells client you can copy the object | 635 | PrimFlags.ObjectCopy | // Tells client you can copy the object |
636 | PrimFlags.ObjectModify | // tells client you can modify the object | 636 | PrimFlags.ObjectModify | // tells client you can modify the object |
637 | PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) | 637 | PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) |
@@ -665,6 +665,16 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
665 | PrimFlags.ObjectMove | 665 | PrimFlags.ObjectMove |
666 | ); | 666 | ); |
667 | 667 | ||
668 | const uint GOD_FLAGS = (uint)( | ||
669 | PrimFlags.ObjectCopy | // Tells client you can copy the object | ||
670 | PrimFlags.ObjectModify | // tells client you can modify the object | ||
671 | PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod) | ||
672 | PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it | ||
673 | PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object | ||
674 | PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object | ||
675 | PrimFlags.ObjectOwnerModify // Tells client that you're the owner of the object | ||
676 | ); | ||
677 | |||
668 | public uint GenerateClientFlags(ScenePresence sp, uint curEffectivePerms, UUID objID) | 678 | public uint GenerateClientFlags(ScenePresence sp, uint curEffectivePerms, UUID objID) |
669 | { | 679 | { |
670 | if(sp == null || curEffectivePerms == 0) | 680 | if(sp == null || curEffectivePerms == 0) |
@@ -684,22 +694,25 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
684 | // gods have owner rights with Modify and Move always on | 694 | // gods have owner rights with Modify and Move always on |
685 | if(sp.IsGod) | 695 | if(sp.IsGod) |
686 | { | 696 | { |
687 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, true); | 697 | // returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, true); |
688 | returnMask |= EXTRAGODMASK; | 698 | // returnMask |= EXTRAGODMASK; |
689 | return returnMask; | 699 | // return returnMask; |
700 | return objflags | GOD_FLAGS; | ||
690 | } | 701 | } |
691 | 702 | ||
703 | SceneObjectGroup grp = task.ParentGroup; | ||
704 | bool unlocked = (grp.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0; | ||
705 | |||
692 | //bypass option == owner rights | 706 | //bypass option == owner rights |
693 | if (m_bypassPermissions) | 707 | if (m_bypassPermissions) |
694 | { | 708 | { |
695 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, true); | 709 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, true); //?? |
696 | returnMask |= EXTRAOWNERMASK; | 710 | returnMask |= EXTRAOWNERMASK; |
697 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) | 711 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) |
698 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; | 712 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; |
699 | return returnMask; | 713 | return returnMask; |
700 | } | 714 | } |
701 | 715 | ||
702 | bool unlocked = (task.ParentGroup.RootPart.OwnerMask & (uint)PermissionMask.Move) != 0; | ||
703 | 716 | ||
704 | UUID taskOwnerID = task.OwnerID; | 717 | UUID taskOwnerID = task.OwnerID; |
705 | UUID spID = sp.UUID; | 718 | UUID spID = sp.UUID; |
@@ -707,7 +720,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
707 | // owner | 720 | // owner |
708 | if (spID == taskOwnerID) | 721 | if (spID == taskOwnerID) |
709 | { | 722 | { |
710 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, unlocked); | 723 | returnMask = ApplyObjectModifyMasks(grp.EffectiveOwnerPerms, objflags, unlocked); |
711 | returnMask |= EXTRAOWNERMASK; | 724 | returnMask |= EXTRAOWNERMASK; |
712 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) | 725 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) |
713 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; | 726 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; |
@@ -717,7 +730,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
717 | // if not god or owner, do attachments as everyone | 730 | // if not god or owner, do attachments as everyone |
718 | if(task.ParentGroup.IsAttachment) | 731 | if(task.ParentGroup.IsAttachment) |
719 | { | 732 | { |
720 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 733 | returnMask = ApplyObjectModifyMasks(grp.EffectiveEveryOnePerms, objflags, unlocked); |
721 | if (taskOwnerID != UUID.Zero) | 734 | if (taskOwnerID != UUID.Zero) |
722 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 735 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
723 | return returnMask; | 736 | return returnMask; |
@@ -729,7 +742,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
729 | // if friends with rights then owner | 742 | // if friends with rights then owner |
730 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) | 743 | if (!groupdOwned && IsFriendWithPerms(spID, taskOwnerID)) |
731 | { | 744 | { |
732 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, unlocked); | 745 | returnMask = ApplyObjectModifyMasks(grp.EffectiveOwnerPerms, objflags, unlocked); |
733 | returnMask |= EXTRAOWNERMASK; | 746 | returnMask |= EXTRAOWNERMASK; |
734 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) | 747 | if((returnMask & (uint)PrimFlags.ObjectModify) != 0) |
735 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; | 748 | returnMask |= (uint)PrimFlags.ObjectOwnerModify; |
@@ -745,7 +758,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
745 | // object is owned by group, check role powers | 758 | // object is owned by group, check role powers |
746 | if((client.GetGroupPowers(taskGroupID) & (ulong)GroupPowers.ObjectManipulate) != 0) | 759 | if((client.GetGroupPowers(taskGroupID) & (ulong)GroupPowers.ObjectManipulate) != 0) |
747 | { | 760 | { |
748 | returnMask = ApplyObjectModifyMasks(task.OwnerMask, objflags, unlocked); | 761 | returnMask = ApplyObjectModifyMasks(grp.EffectiveOwnerPerms, objflags, unlocked); |
749 | returnMask |= | 762 | returnMask |= |
750 | (uint)PrimFlags.ObjectGroupOwned | | 763 | (uint)PrimFlags.ObjectGroupOwned | |
751 | (uint)PrimFlags.ObjectAnyOwner; | 764 | (uint)PrimFlags.ObjectAnyOwner; |
@@ -756,7 +769,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
756 | else | 769 | else |
757 | { | 770 | { |
758 | // group sharing or everyone | 771 | // group sharing or everyone |
759 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 772 | returnMask = ApplyObjectModifyMasks(grp.EffectiveGroupOrEveryOnePerms, objflags, unlocked); |
760 | returnMask |= | 773 | returnMask |= |
761 | (uint)PrimFlags.ObjectGroupOwned | | 774 | (uint)PrimFlags.ObjectGroupOwned | |
762 | (uint)PrimFlags.ObjectAnyOwner; | 775 | (uint)PrimFlags.ObjectAnyOwner; |
@@ -766,7 +779,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
766 | else | 779 | else |
767 | { | 780 | { |
768 | // group sharing or everyone | 781 | // group sharing or everyone |
769 | returnMask = ApplyObjectModifyMasks(task.GroupMask | task.EveryoneMask, objflags, unlocked); | 782 | returnMask = ApplyObjectModifyMasks(grp.EffectiveGroupOrEveryOnePerms, objflags, unlocked); |
770 | if (taskOwnerID != UUID.Zero) | 783 | if (taskOwnerID != UUID.Zero) |
771 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 784 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
772 | return returnMask; | 785 | return returnMask; |
@@ -774,7 +787,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
774 | } | 787 | } |
775 | 788 | ||
776 | // fallback is everyone rights | 789 | // fallback is everyone rights |
777 | returnMask = ApplyObjectModifyMasks(task.EveryoneMask, objflags, unlocked); | 790 | returnMask = ApplyObjectModifyMasks(grp.EffectiveEveryOnePerms, objflags, unlocked); |
778 | if (taskOwnerID != UUID.Zero) | 791 | if (taskOwnerID != UUID.Zero) |
779 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; | 792 | returnMask |= (uint)PrimFlags.ObjectAnyOwner; |
780 | return returnMask; | 793 | return returnMask; |
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs index 0c4017e..2af6ff0 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityInventory.cs | |||
@@ -278,6 +278,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
278 | /// <param name="datastore"></param> | 278 | /// <param name="datastore"></param> |
279 | void ProcessInventoryBackup(ISimulationDataService datastore); | 279 | void ProcessInventoryBackup(ISimulationDataService datastore); |
280 | 280 | ||
281 | void AggregateEveryOnePerms(ref uint current); | ||
282 | void AggregateGroupOrEveryonePerms(ref uint current); | ||
283 | void AggregateGroupPerms(ref uint current); | ||
284 | void AggregateOwnerPerms(ref uint current); | ||
285 | |||
281 | uint MaskEffectivePermissions(); | 286 | uint MaskEffectivePermissions(); |
282 | 287 | ||
283 | void ApplyNextOwnerPermissions(); | 288 | void ApplyNextOwnerPermissions(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 9f98554..f44604b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -248,6 +248,183 @@ namespace OpenSim.Region.Framework.Scenes | |||
248 | return -1; | 248 | return -1; |
249 | } | 249 | } |
250 | 250 | ||
251 | // new test code, to place in better place later | ||
252 | private object PermissionsLock = new object(); | ||
253 | |||
254 | private uint m_EffectiveEveryOnePerms; | ||
255 | public uint EffectiveEveryOnePerms | ||
256 | { | ||
257 | get | ||
258 | { | ||
259 | // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) | ||
260 | // bc this is on heavy duty code paths | ||
261 | // but for now we need to test the concept | ||
262 | AggregateEveryOnePerms(); | ||
263 | return m_EffectiveEveryOnePerms; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | public void AggregateEveryOnePerms() | ||
268 | { | ||
269 | lock(PermissionsLock) | ||
270 | { | ||
271 | // get object everyone permissions | ||
272 | uint baseperms = RootPart.EveryoneMask & (uint)PermissionMask.All; | ||
273 | |||
274 | if(baseperms == 0) | ||
275 | { | ||
276 | m_EffectiveEveryOnePerms = 0; | ||
277 | return; | ||
278 | } | ||
279 | |||
280 | uint current = baseperms; | ||
281 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
282 | for (int i = 0; i < parts.Length; i++) | ||
283 | { | ||
284 | SceneObjectPart part = parts[i]; | ||
285 | part.Inventory.AggregateEveryOnePerms(ref current); | ||
286 | if( current == 0) | ||
287 | break; | ||
288 | } | ||
289 | // recover move | ||
290 | baseperms &= (uint)PermissionMask.Move; | ||
291 | current |= baseperms; | ||
292 | current &= (uint)PermissionMask.All; | ||
293 | m_EffectiveEveryOnePerms = current; | ||
294 | } | ||
295 | } | ||
296 | |||
297 | private uint m_EffectiveGroupPerms; | ||
298 | public uint EffectiveGroupPerms | ||
299 | { | ||
300 | get | ||
301 | { | ||
302 | // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) | ||
303 | // bc this is on heavy duty code paths | ||
304 | // but for now we need to test the concept | ||
305 | AggregateGroupPerms(); | ||
306 | return m_EffectiveGroupPerms; | ||
307 | } | ||
308 | } | ||
309 | |||
310 | public void AggregateGroupPerms() | ||
311 | { | ||
312 | lock(PermissionsLock) | ||
313 | { | ||
314 | // get object everyone permissions | ||
315 | uint baseperms = RootPart.GroupMask & (uint)PermissionMask.All; | ||
316 | |||
317 | if(baseperms == 0) | ||
318 | { | ||
319 | m_EffectiveGroupPerms = 0; | ||
320 | return; | ||
321 | } | ||
322 | |||
323 | uint current = baseperms; | ||
324 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
325 | for (int i = 0; i < parts.Length; i++) | ||
326 | { | ||
327 | SceneObjectPart part = parts[i]; | ||
328 | part.Inventory.AggregateGroupPerms(ref current); | ||
329 | if( current == 0) | ||
330 | break; | ||
331 | } | ||
332 | // recover modify and move | ||
333 | baseperms &= (uint)(PermissionMask.Move | PermissionMask.Modify ); | ||
334 | current |= baseperms; | ||
335 | current &= (uint)PermissionMask.All; | ||
336 | m_EffectiveGroupPerms = current; | ||
337 | } | ||
338 | } | ||
339 | |||
340 | private uint m_EffectiveGroupOrEveryOnePerms; | ||
341 | public uint EffectiveGroupOrEveryOnePerms | ||
342 | { | ||
343 | get | ||
344 | { | ||
345 | // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) | ||
346 | // bc this is on heavy duty code paths | ||
347 | // but for now we need to test the concept | ||
348 | AggregateGroupOrEveryOnePerms(); | ||
349 | return m_EffectiveGroupOrEveryOnePerms; | ||
350 | } | ||
351 | } | ||
352 | |||
353 | public void AggregateGroupOrEveryOnePerms() | ||
354 | { | ||
355 | lock(PermissionsLock) | ||
356 | { | ||
357 | // get object everyone permissions | ||
358 | uint baseperms = (RootPart.EveryoneMask | RootPart.GroupMask) & (uint)PermissionMask.All; | ||
359 | |||
360 | if(baseperms == 0) | ||
361 | { | ||
362 | m_EffectiveGroupOrEveryOnePerms = 0; | ||
363 | return; | ||
364 | } | ||
365 | |||
366 | uint current = baseperms; | ||
367 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
368 | for (int i = 0; i < parts.Length; i++) | ||
369 | { | ||
370 | SceneObjectPart part = parts[i]; | ||
371 | part.Inventory.AggregateGroupOrEveryonePerms(ref current); | ||
372 | if( current == 0) | ||
373 | break; | ||
374 | } | ||
375 | // recover modify and move | ||
376 | baseperms &= (uint)(PermissionMask.Move | PermissionMask.Modify ); | ||
377 | current |= baseperms; | ||
378 | current &= (uint)PermissionMask.All; | ||
379 | m_EffectiveGroupOrEveryOnePerms = current; | ||
380 | } | ||
381 | } | ||
382 | |||
383 | private uint m_EffectiveOwnerPerms; | ||
384 | public uint EffectiveOwnerPerms | ||
385 | { | ||
386 | get | ||
387 | { | ||
388 | // this can't be done here but on every place where a change may happen (rez, (de)link, contents , perms, etc) | ||
389 | // bc this is on heavy duty code paths | ||
390 | // but for now we need to test the concept | ||
391 | AggregateOwnerPerms(); | ||
392 | return m_EffectiveOwnerPerms; | ||
393 | } | ||
394 | } | ||
395 | |||
396 | public void AggregateOwnerPerms() | ||
397 | { | ||
398 | lock(PermissionsLock) | ||
399 | { | ||
400 | // get object everyone permissions | ||
401 | uint baseperms = RootPart.OwnerMask & (uint)PermissionMask.All; | ||
402 | |||
403 | if(baseperms == 0) | ||
404 | { | ||
405 | m_EffectiveOwnerPerms = 0; | ||
406 | return; | ||
407 | } | ||
408 | |||
409 | uint current = baseperms; | ||
410 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
411 | for (int i = 0; i < parts.Length; i++) | ||
412 | { | ||
413 | SceneObjectPart part = parts[i]; | ||
414 | part.Inventory.AggregateOwnerPerms(ref current); | ||
415 | if( current == 0) | ||
416 | break; | ||
417 | } | ||
418 | // recover modify and move | ||
419 | baseperms &= (uint)(PermissionMask.Move | PermissionMask.Modify ); | ||
420 | current |= baseperms; | ||
421 | current &= (uint)PermissionMask.All; | ||
422 | if((current & (uint)(PermissionMask.Copy | PermissionMask.Transfer)) == 0) | ||
423 | current |= (uint)PermissionMask.Transfer; | ||
424 | m_EffectiveOwnerPerms = current; | ||
425 | } | ||
426 | } | ||
427 | |||
251 | public uint GetEffectivePermissions() | 428 | public uint GetEffectivePermissions() |
252 | { | 429 | { |
253 | return GetEffectivePermissions(false); | 430 | return GetEffectivePermissions(false); |
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; |