mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 03:06:05 +08:00
Fix a permissions issue
This commit is contained in:
committed by
Melanie
parent
33aa7ba7dc
commit
39cd57598b
@@ -432,10 +432,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
(uint)PermissionMask.Move;
|
||||
uint ownerPerms = item.CurrentPermissions;
|
||||
|
||||
// Mask the base permissions. This is a conservative
|
||||
// approach altering only the three main perms
|
||||
basePerms &= nextPerms;
|
||||
|
||||
// If this is an object, root prim perms may be more
|
||||
// permissive than folded perms. Use folded perms as
|
||||
// a mask
|
||||
@@ -451,10 +447,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
|
||||
// Mask the owner perms to the folded perms
|
||||
ownerPerms &= foldedPerms;
|
||||
basePerms &= foldedPerms;
|
||||
|
||||
// If the root was mod, let the mask reflect that
|
||||
// We also need to adjust the base here, because
|
||||
// we should be able to edit in-inventory perms
|
||||
// for the root prim, if it's mod.
|
||||
if (isRootMod)
|
||||
{
|
||||
ownerPerms |= (uint)PermissionMask.Modify;
|
||||
basePerms |= (uint)PermissionMask.Modify;
|
||||
}
|
||||
}
|
||||
|
||||
// These will be applied to the root prim at next rez.
|
||||
@@ -462,6 +465,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
// are preserved due to the above mangling
|
||||
ownerPerms &= nextPerms;
|
||||
|
||||
// Mask the base permissions. This is a conservative
|
||||
// approach altering only the three main perms
|
||||
basePerms &= nextPerms;
|
||||
|
||||
// Assign to the actual item. Make sure the slam bit is
|
||||
// set, if it wasn't set before.
|
||||
itemCopy.BasePermissions = basePerms;
|
||||
|
||||
Reference in New Issue
Block a user