From cf317f5c3352f066fd61a0fa5de19c93947be22c Mon Sep 17 00:00:00 2001
From: Sean Dague
Date: Wed, 23 Jul 2008 22:14:29 +0000
Subject: refactor TaskInventoryItem Mask -> Permissions to be consistant with
how things are stored in the db.
---
OpenSim/Data/MSSQL/MSSQLDataStore.cs | 20 ++---
OpenSim/Data/MySQL/MySQLDataStore.cs | 20 ++---
.../Data/NHibernate/Resources/RegionStore.hbm.xml | 17 ++++
OpenSim/Data/SQLite/SQLiteRegionData.cs | 20 ++---
OpenSim/Framework/TaskInventoryItem.cs | 10 +--
.../Region/ClientStack/LindenUDP/LLClientView.cs | 12 +--
.../Region/Environment/Scenes/Scene.Inventory.cs | 100 ++++++++++-----------
.../Scenes/SceneObjectGroup.Inventory.cs | 8 +-
.../Scenes/SceneObjectPart.Inventory.cs | 42 ++++-----
.../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 12 +--
.../Shared/Api/Implementation/LSL_Api.cs | 12 +--
11 files changed, 145 insertions(+), 128 deletions(-)
(limited to 'OpenSim')
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 0ae879a..3f85fef 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -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;
}
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index 2ace4b1..7482df3 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -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;
}
diff --git a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
index 9fc8065..00bf841 100644
--- a/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
+++ b/OpenSim/Data/NHibernate/Resources/RegionStore.hbm.xml
@@ -110,4 +110,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 0f9323b..f780d1d 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -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;
}
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index 512ba99..9b497ab 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -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;
}
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index d1fd63c..efc910a 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -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;
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 5caf0f0..d0c5842 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -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;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index 0696432..cc4891f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -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;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 841b7b6..480c030 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -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);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 50691a5..2d5be27 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -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;
}
}
}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a747586..9832cfc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -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;
}
}
}
--
cgit v1.1