refactor TaskInventoryItem Mask -> Permissions to be consistant with how things

are stored in the db.
0.6.0-stable
Sean Dague 2008-07-23 22:14:29 +00:00
parent 3c227390c0
commit cf317f5c33
11 changed files with 145 additions and 128 deletions

View File

@ -973,11 +973,11 @@ namespace OpenSim.Data.MSSQL
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]);
taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]);
taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
// taskItem.Flags = Convert.ToUInt32(row["flags"]);
return taskItem;
@ -1170,11 +1170,11 @@ namespace OpenSim.Data.MSSQL
row["ownerID"] = taskItem.OwnerID;
row["lastOwnerID"] = taskItem.LastOwnerID;
row["groupID"] = taskItem.GroupID;
row["nextPermissions"] = taskItem.NextOwnerMask;
row["currentPermissions"] = taskItem.OwnerMask;
row["basePermissions"] = taskItem.BaseMask;
row["everyonePermissions"] = taskItem.EveryoneMask;
row["groupPermissions"] = taskItem.GroupMask;
row["nextPermissions"] = taskItem.NextPermissions;
row["currentPermissions"] = taskItem.CurrentPermissions;
row["basePermissions"] = taskItem.BasePermissions;
row["everyonePermissions"] = taskItem.EveryonePermissions;
row["groupPermissions"] = taskItem.GroupPermissions;
// row["flags"] = taskItem.Flags;
}

View File

@ -1258,11 +1258,11 @@ namespace OpenSim.Data.MySQL
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]);
taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]);
taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
taskItem.Flags = Convert.ToUInt32(row["flags"]);
return taskItem;
@ -1519,11 +1519,11 @@ namespace OpenSim.Data.MySQL
row["ownerID"] = taskItem.OwnerID;
row["lastOwnerID"] = taskItem.LastOwnerID;
row["groupID"] = taskItem.GroupID;
row["nextPermissions"] = taskItem.NextOwnerMask;
row["currentPermissions"] = taskItem.OwnerMask;
row["basePermissions"] = taskItem.BaseMask;
row["everyonePermissions"] = taskItem.EveryoneMask;
row["groupPermissions"] = taskItem.GroupMask;
row["nextPermissions"] = taskItem.NextPermissions;
row["currentPermissions"] = taskItem.CurrentPermissions;
row["basePermissions"] = taskItem.BasePermissions;
row["everyonePermissions"] = taskItem.EveryonePermissions;
row["groupPermissions"] = taskItem.GroupPermissions;
row["flags"] = taskItem.Flags;
}

View File

@ -110,4 +110,21 @@
</id>
<property name="Map" type="System.Byte[]" />
</class>
<class name="OpenSim.Framework.TaskInventoryItem, OpenSim.Framework" table="PrimItems" lazy="false">
<id name="ItemID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate">
<generator class="assigned" />
</id>
<property name="PrimID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="AssetID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="ParentFolderID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="CreatorID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="OwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="GroupID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="LastOwnerID" type="OpenSim.Data.NHibernate.LLUUIDUserType, OpenSim.Data.NHibernate"/>
<property name="CurrentPermissions" type="System.UInt32" />
<property name="BasePermissions" type="System.UInt32" />
<property name="EveryonePermissions" type="System.UInt32" />
<property name="GroupPermissions" type="System.UInt32" />
<property name="NextPermissions" type="System.UInt32" />
</class>
</hibernate-mapping>

View File

@ -1014,11 +1014,11 @@ namespace OpenSim.Data.SQLite
taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]);
taskItem.GroupID = new LLUUID((String)row["groupID"]);
taskItem.NextOwnerMask = Convert.ToUInt32(row["nextPermissions"]);
taskItem.OwnerMask = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BaseMask = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryoneMask = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupMask = Convert.ToUInt32(row["groupPermissions"]);
taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
taskItem.BasePermissions = Convert.ToUInt32(row["basePermissions"]);
taskItem.EveryonePermissions = Convert.ToUInt32(row["everyonePermissions"]);
taskItem.GroupPermissions = Convert.ToUInt32(row["groupPermissions"]);
taskItem.Flags = Convert.ToUInt32(row["flags"]);
return taskItem;
@ -1254,11 +1254,11 @@ namespace OpenSim.Data.SQLite
row["ownerID"] = taskItem.OwnerID;
row["lastOwnerID"] = taskItem.LastOwnerID;
row["groupID"] = taskItem.GroupID;
row["nextPermissions"] = taskItem.NextOwnerMask;
row["currentPermissions"] = taskItem.OwnerMask;
row["basePermissions"] = taskItem.BaseMask;
row["everyonePermissions"] = taskItem.EveryoneMask;
row["groupPermissions"] = taskItem.GroupMask;
row["nextPermissions"] = taskItem.NextPermissions;
row["currentPermissions"] = taskItem.CurrentPermissions;
row["basePermissions"] = taskItem.BasePermissions;
row["everyonePermissions"] = taskItem.EveryonePermissions;
row["groupPermissions"] = taskItem.GroupPermissions;
row["flags"] = taskItem.Flags;
}

View File

@ -236,7 +236,7 @@ namespace OpenSim.Framework
}
}
public uint BaseMask {
public uint BasePermissions {
get {
return _baseMask;
}
@ -272,7 +272,7 @@ namespace OpenSim.Framework
}
}
public uint EveryoneMask {
public uint EveryonePermissions {
get {
return _everyoneMask;
}
@ -299,7 +299,7 @@ namespace OpenSim.Framework
}
}
public uint GroupMask {
public uint GroupPermissions {
get {
return _groupMask;
}
@ -344,7 +344,7 @@ namespace OpenSim.Framework
}
}
public uint NextOwnerMask {
public uint NextPermissions {
get {
return _nextOwnerMask;
}
@ -362,7 +362,7 @@ namespace OpenSim.Framework
}
}
public uint OwnerMask {
public uint CurrentPermissions {
get {
return _ownerMask;
}

View File

@ -4756,7 +4756,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (ti.OwnerID != AgentId)
break;
if ((ti.OwnerMask & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
if ((ti.CurrentPermissions & ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer)) != ((uint)PermissionMask.Modify| (uint)PermissionMask.Copy | (uint)PermissionMask.Transfer))
break;
if (ti.AssetID != requestID)
@ -5103,11 +5103,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
newTaskItem.CreatorID = updatetask.InventoryData.CreatorID;
newTaskItem.OwnerID = updatetask.InventoryData.OwnerID;
newTaskItem.GroupID = updatetask.InventoryData.GroupID;
newTaskItem.BaseMask = updatetask.InventoryData.BaseMask;
newTaskItem.OwnerMask = updatetask.InventoryData.OwnerMask;
newTaskItem.GroupMask = updatetask.InventoryData.GroupMask;
newTaskItem.EveryoneMask = updatetask.InventoryData.EveryoneMask;
newTaskItem.NextOwnerMask = updatetask.InventoryData.NextOwnerMask;
newTaskItem.BasePermissions = updatetask.InventoryData.BaseMask;
newTaskItem.CurrentPermissions = updatetask.InventoryData.OwnerMask;
newTaskItem.GroupPermissions = updatetask.InventoryData.GroupMask;
newTaskItem.EveryonePermissions = updatetask.InventoryData.EveryoneMask;
newTaskItem.NextPermissions = updatetask.InventoryData.NextOwnerMask;
//newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
newTaskItem.Type = updatetask.InventoryData.Type;
newTaskItem.InvType = updatetask.InventoryData.InvType;

View File

@ -919,22 +919,22 @@ namespace OpenSim.Region.Environment.Scenes
if ((destAgent != taskItem.OwnerID) && ExternalChecks.ExternalChecksPropagatePermissions())
{
agentItem.BasePermissions = taskItem.NextOwnerMask;
agentItem.CurrentPermissions = taskItem.NextOwnerMask;
agentItem.NextPermissions = taskItem.NextOwnerMask;
agentItem.EveryOnePermissions = taskItem.EveryoneMask & taskItem.NextOwnerMask;
agentItem.BasePermissions = taskItem.NextPermissions;
agentItem.CurrentPermissions = taskItem.NextPermissions;
agentItem.NextPermissions = taskItem.NextPermissions;
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
}
else
{
agentItem.BasePermissions = taskItem.BaseMask;
agentItem.CurrentPermissions = taskItem.OwnerMask;
agentItem.NextPermissions = taskItem.NextOwnerMask;
agentItem.EveryOnePermissions = taskItem.EveryoneMask;
agentItem.BasePermissions = taskItem.BasePermissions;
agentItem.CurrentPermissions = taskItem.CurrentPermissions;
agentItem.NextPermissions = taskItem.NextPermissions;
agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
}
if (!ExternalChecks.ExternalChecksBypassPermissions())
{
if ((taskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
part.RemoveInventoryItem(itemId);
}
@ -1083,26 +1083,26 @@ namespace OpenSim.Region.Environment.Scenes
destTaskItem.ParentID = destPart.UUID;
destTaskItem.ParentPartID = destPart.UUID;
destTaskItem.BaseMask = srcTaskItem.BaseMask;
destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask;
destTaskItem.GroupMask = srcTaskItem.GroupMask;
destTaskItem.OwnerMask = srcTaskItem.OwnerMask;
destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
destTaskItem.Flags = srcTaskItem.Flags;
if (destPart.OwnerID != part.OwnerID)
{
if (ExternalChecks.ExternalChecksPropagatePermissions())
{
destTaskItem.OwnerMask = srcTaskItem.OwnerMask &
srcTaskItem.NextOwnerMask;
destTaskItem.GroupMask = srcTaskItem.GroupMask &
srcTaskItem.NextOwnerMask;
destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask &
srcTaskItem.NextOwnerMask;
destTaskItem.BaseMask = srcTaskItem.BaseMask &
srcTaskItem.NextOwnerMask;
destTaskItem.OwnerMask |= 8; // Slam!
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
srcTaskItem.NextPermissions;
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
srcTaskItem.NextPermissions;
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
srcTaskItem.NextPermissions;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
srcTaskItem.NextPermissions;
destTaskItem.CurrentPermissions |= 8; // Slam!
}
}
@ -1113,7 +1113,7 @@ namespace OpenSim.Region.Environment.Scenes
destPart.AddInventoryItem(destTaskItem);
if ((srcTaskItem.OwnerMask & (uint)PermissionMask.Copy) == 0)
if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
part.RemoveInventoryItem(itemId);
ScenePresence avatar;
@ -1331,12 +1331,12 @@ namespace OpenSim.Region.Environment.Scenes
taskItem.InvType = itemBase.InvType;
taskItem.OwnerID = itemBase.Owner;
taskItem.CreatorID = itemBase.Creator;
taskItem.BaseMask = itemBase.BasePermissions;
taskItem.OwnerMask = itemBase.CurrentPermissions;
taskItem.EveryoneMask = itemBase.EveryOnePermissions;
taskItem.NextOwnerMask = itemBase.NextPermissions;
taskItem.BasePermissions = itemBase.BasePermissions;
taskItem.CurrentPermissions = itemBase.CurrentPermissions;
taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
taskItem.NextPermissions = itemBase.NextPermissions;
taskItem.GroupID = itemBase.GroupID;
taskItem.GroupMask = 0;
taskItem.GroupPermissions = 0;
taskItem.Flags = itemBase.Flags;
taskItem.PermsGranter = LLUUID.Zero;
taskItem.PermsMask = 0;
@ -1409,26 +1409,26 @@ namespace OpenSim.Region.Environment.Scenes
destTaskItem.ParentID = destPart.UUID;
destTaskItem.ParentPartID = destPart.UUID;
destTaskItem.BaseMask = srcTaskItem.BaseMask;
destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask;
destTaskItem.GroupMask = srcTaskItem.GroupMask;
destTaskItem.OwnerMask = srcTaskItem.OwnerMask;
destTaskItem.NextOwnerMask = srcTaskItem.NextOwnerMask;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions;
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions;
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions;
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions;
destTaskItem.NextPermissions = srcTaskItem.NextPermissions;
destTaskItem.Flags = srcTaskItem.Flags;
if (destPart.OwnerID != srcPart.OwnerID)
{
if (ExternalChecks.ExternalChecksPropagatePermissions())
{
destTaskItem.OwnerMask = srcTaskItem.OwnerMask &
srcTaskItem.NextOwnerMask;
destTaskItem.GroupMask = srcTaskItem.GroupMask &
srcTaskItem.NextOwnerMask;
destTaskItem.EveryoneMask = srcTaskItem.EveryoneMask &
srcTaskItem.NextOwnerMask;
destTaskItem.BaseMask = srcTaskItem.BaseMask &
srcTaskItem.NextOwnerMask;
destTaskItem.OwnerMask |= 8; // Slam!
destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions &
srcTaskItem.NextPermissions;
destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions &
srcTaskItem.NextPermissions;
destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions &
srcTaskItem.NextPermissions;
destTaskItem.BasePermissions = srcTaskItem.BasePermissions &
srcTaskItem.NextPermissions;
destTaskItem.CurrentPermissions |= 8; // Slam!
}
}
@ -2088,12 +2088,12 @@ namespace OpenSim.Region.Environment.Scenes
{
if (ExternalChecks.ExternalChecksPropagatePermissions())
{
if ((item.OwnerMask & 8) != 0)
if ((item.CurrentPermissions & 8) != 0)
{
foreach (SceneObjectPart part in partList)
{
part.EveryoneMask = item.EveryoneMask;
part.NextOwnerMask = item.NextOwnerMask;
part.EveryoneMask = item.EveryonePermissions;
part.NextOwnerMask = item.NextPermissions;
}
}
group.ApplyNextOwnerPermissions();
@ -2108,10 +2108,10 @@ namespace OpenSim.Region.Environment.Scenes
part.OwnerID = item.OwnerID;
part.ChangeInventoryOwner(item.OwnerID);
}
else if ((item.OwnerMask & 8) != 0) // Slam!
else if ((item.CurrentPermissions & 8) != 0) // Slam!
{
part.EveryoneMask = item.EveryoneMask;
part.NextOwnerMask = item.NextOwnerMask;
part.EveryoneMask = item.EveryonePermissions;
part.NextOwnerMask = item.NextPermissions;
}
}
rootPart.TrimPermissions();
@ -2127,7 +2127,7 @@ namespace OpenSim.Region.Environment.Scenes
if (!ExternalChecks.ExternalChecksBypassPermissions())
{
if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0)
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
sourcePart.RemoveInventoryItem(item.ItemID);
}
return rootPart.ParentGroup;

View File

@ -151,11 +151,11 @@ namespace OpenSim.Region.Environment.Scenes
taskItem.Type = item.AssetType;
taskItem.InvType = item.InvType;
taskItem.BaseMask = item.BasePermissions;
taskItem.OwnerMask = item.CurrentPermissions;
taskItem.BasePermissions = item.BasePermissions;
taskItem.CurrentPermissions = item.CurrentPermissions;
// FIXME: ignoring group permissions for now as they aren't stored in item
taskItem.EveryoneMask = item.EveryOnePermissions;
taskItem.NextOwnerMask = item.NextPermissions;
taskItem.EveryonePermissions = item.EveryOnePermissions;
taskItem.NextPermissions = item.NextPermissions;
taskItem.Flags = item.Flags;
// TODO: These are pending addition of those fields to TaskInventoryItem
// taskItem.SalePrice = item.SalePrice;

View File

@ -526,8 +526,8 @@ namespace OpenSim.Region.Environment.Scenes
{
LLUUID ownerID = item.OwnerID;
uint everyoneMask = 0;
uint baseMask = item.BaseMask;
uint ownerMask = item.OwnerMask;
uint baseMask = item.BasePermissions;
uint ownerMask = item.CurrentPermissions;
if (item.InvType == 10) // Script
{
@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Scenes
invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask));
invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextPermissions));
invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
invString.AddNameValueLine("owner_id", ownerID.ToString());
@ -680,28 +680,28 @@ namespace OpenSim.Region.Environment.Scenes
{
if (item.InvType != 6)
{
if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Copy) == 0)
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0)
mask &= ~((uint)PermissionMask.Copy >> 13);
if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Transfer) == 0)
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0)
mask &= ~((uint)PermissionMask.Transfer >> 13);
if ((item.OwnerMask & item.NextOwnerMask & (uint)PermissionMask.Modify) == 0)
if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0)
mask &= ~((uint)PermissionMask.Modify >> 13);
}
else
{
if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0)
if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
mask &= ~((uint)PermissionMask.Copy >> 13);
if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0)
if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
mask &= ~((uint)PermissionMask.Transfer >> 13);
if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0)
if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
mask &= ~((uint)PermissionMask.Modify >> 13);
}
if ((item.OwnerMask & (uint)PermissionMask.Copy) == 0)
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
mask &= ~(uint)PermissionMask.Copy;
if ((item.OwnerMask & (uint)PermissionMask.Transfer) == 0)
if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0)
mask &= ~(uint)PermissionMask.Transfer;
if ((item.OwnerMask & (uint)PermissionMask.Modify) == 0)
if ((item.CurrentPermissions & (uint)PermissionMask.Modify) == 0)
mask &= ~(uint)PermissionMask.Modify;
}
return mask;
@ -717,16 +717,16 @@ namespace OpenSim.Region.Environment.Scenes
{
if (item.InvType == 6)
{
if ((item.OwnerMask & ((uint)PermissionMask.Copy >> 13)) == 0)
item.OwnerMask &= ~(uint)PermissionMask.Copy;
if ((item.OwnerMask & ((uint)PermissionMask.Transfer >> 13)) == 0)
item.OwnerMask &= ~(uint)PermissionMask.Transfer;
if ((item.OwnerMask & ((uint)PermissionMask.Modify >> 13)) == 0)
item.OwnerMask &= ~(uint)PermissionMask.Modify;
if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0)
item.CurrentPermissions &= ~(uint)PermissionMask.Copy;
if ((item.CurrentPermissions & ((uint)PermissionMask.Transfer >> 13)) == 0)
item.CurrentPermissions &= ~(uint)PermissionMask.Transfer;
if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0)
item.CurrentPermissions &= ~(uint)PermissionMask.Modify;
}
item.OwnerMask &= item.NextOwnerMask;
item.BaseMask &= item.NextOwnerMask;
item.EveryoneMask &= item.NextOwnerMask;
item.CurrentPermissions &= item.NextPermissions;
item.BasePermissions &= item.NextPermissions;
item.EveryonePermissions &= item.NextPermissions;
}
TriggerScriptChangedEvent(Changed.OWNER);

View File

@ -3361,7 +3361,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{
if (inv.Value.Name == name)
{
if ((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
if ((inv.Value.CurrentPermissions & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
{
return inv.Value.AssetID.ToString();
}
@ -6508,15 +6508,15 @@ namespace OpenSim.Region.ScriptEngine.Common
switch (mask)
{
case 0:
return (int)inv.Value.BaseMask;
return (int)inv.Value.BasePermissions;
case 1:
return (int)inv.Value.OwnerMask;
return (int)inv.Value.CurrentPermissions;
case 2:
return (int)inv.Value.GroupMask;
return (int)inv.Value.GroupPermissions;
case 3:
return (int)inv.Value.EveryoneMask;
return (int)inv.Value.EveryonePermissions;
case 4:
return (int)inv.Value.NextOwnerMask;
return (int)inv.Value.NextPermissions;
}
}
}

View File

@ -3302,7 +3302,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
if (inv.Value.Name == name)
{
if ((inv.Value.OwnerMask & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
if ((inv.Value.CurrentPermissions & (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify)) == (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify))
{
return inv.Value.AssetID.ToString();
}
@ -6287,15 +6287,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
switch (mask)
{
case 0:
return (int)inv.Value.BaseMask;
return (int)inv.Value.BasePermissions;
case 1:
return (int)inv.Value.OwnerMask;
return (int)inv.Value.CurrentPermissions;
case 2:
return (int)inv.Value.GroupMask;
return (int)inv.Value.GroupPermissions;
case 3:
return (int)inv.Value.EveryoneMask;
return (int)inv.Value.EveryonePermissions;
case 4:
return (int)inv.Value.NextOwnerMask;
return (int)inv.Value.NextPermissions;
}
}
}