Add group permissions to agent inventory.
Contains a migration. May contain nuts. Please back up your inventory data store. This revision changes the interface version!! No older regions can connect to these new UGAIM, and the new regions can't connect to the old UGAIM. Fixes a long-standing issue of permissions loss Currently persisted on MySQL only.0.6.1-post-fixes
parent
e3770cfee6
commit
d66f3993de
|
@ -1329,6 +1329,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
rdata.writer.WriteStartElement(String.Empty, "Permissions", String.Empty);
|
rdata.writer.WriteStartElement(String.Empty, "Permissions", String.Empty);
|
||||||
rdata.writer.WriteAttributeString("current", String.Empty, i.CurrentPermissions.ToString("X"));
|
rdata.writer.WriteAttributeString("current", String.Empty, i.CurrentPermissions.ToString("X"));
|
||||||
rdata.writer.WriteAttributeString("next", String.Empty, i.NextPermissions.ToString("X"));
|
rdata.writer.WriteAttributeString("next", String.Empty, i.NextPermissions.ToString("X"));
|
||||||
|
rdata.writer.WriteAttributeString("group", String.Empty, i.GroupPermissions.ToString("X"));
|
||||||
rdata.writer.WriteAttributeString("everyone", String.Empty, i.EveryOnePermissions.ToString("X"));
|
rdata.writer.WriteAttributeString("everyone", String.Empty, i.EveryOnePermissions.ToString("X"));
|
||||||
rdata.writer.WriteAttributeString("base", String.Empty, i.BasePermissions.ToString("X"));
|
rdata.writer.WriteAttributeString("base", String.Empty, i.BasePermissions.ToString("X"));
|
||||||
rdata.writer.WriteEndElement();
|
rdata.writer.WriteEndElement();
|
||||||
|
@ -1950,6 +1951,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
case "next" :
|
case "next" :
|
||||||
ic.NextPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
|
ic.NextPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
|
||||||
break;
|
break;
|
||||||
|
case "group" :
|
||||||
|
ic.GroupPermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
|
||||||
|
break;
|
||||||
case "everyone" :
|
case "everyone" :
|
||||||
ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
|
ic.EveryOnePermissions = UInt32.Parse(ic.xml.Value, System.Globalization.NumberStyles.HexNumber);
|
||||||
break;
|
break;
|
||||||
|
@ -2061,6 +2065,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
ic.Item.CurrentPermissions = ic.CurrentPermissions;
|
ic.Item.CurrentPermissions = ic.CurrentPermissions;
|
||||||
ic.Item.EveryOnePermissions = ic.EveryOnePermissions;
|
ic.Item.EveryOnePermissions = ic.EveryOnePermissions;
|
||||||
ic.Item.BasePermissions = ic.BasePermissions;
|
ic.Item.BasePermissions = ic.BasePermissions;
|
||||||
|
ic.Item.GroupPermissions = ic.GroupPermissions;
|
||||||
ic.Item.NextPermissions = ic.NextPermissions;
|
ic.Item.NextPermissions = ic.NextPermissions;
|
||||||
|
|
||||||
// If no type was specified for this item, we can attempt to
|
// If no type was specified for this item, we can attempt to
|
||||||
|
@ -2258,11 +2263,13 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
internal /*static*/ const uint DefaultNext = 0x82000;
|
internal /*static*/ const uint DefaultNext = 0x82000;
|
||||||
internal /*static*/ const uint DefaultBase = 0x7FFFFFFF;
|
internal /*static*/ const uint DefaultBase = 0x7FFFFFFF;
|
||||||
internal /*static*/ const uint DefaultEveryOne = 0x0;
|
internal /*static*/ const uint DefaultEveryOne = 0x0;
|
||||||
|
internal /*static*/ const uint DefaultGroup = 0x0;
|
||||||
|
|
||||||
internal uint CurrentPermissions = 0x00;
|
internal uint CurrentPermissions = 0x00;
|
||||||
internal uint NextPermissions = 0x00;
|
internal uint NextPermissions = 0x00;
|
||||||
internal uint BasePermissions = 0x00;
|
internal uint BasePermissions = 0x00;
|
||||||
internal uint EveryOnePermissions = 0x00;
|
internal uint EveryOnePermissions = 0x00;
|
||||||
|
internal uint GroupPermissions = 0x00;
|
||||||
|
|
||||||
internal XmlInventoryCollection()
|
internal XmlInventoryCollection()
|
||||||
{
|
{
|
||||||
|
@ -2286,6 +2293,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
|
||||||
CurrentPermissions = DefaultCurrent;
|
CurrentPermissions = DefaultCurrent;
|
||||||
NextPermissions = DefaultNext;
|
NextPermissions = DefaultNext;
|
||||||
BasePermissions = DefaultBase;
|
BasePermissions = DefaultBase;
|
||||||
|
GroupPermissions = DefaultGroup;
|
||||||
EveryOnePermissions = DefaultEveryOne;
|
EveryOnePermissions = DefaultEveryOne;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -333,6 +333,7 @@ namespace OpenSim.Data.MySQL
|
||||||
item.InvType = (int) reader["invType"];
|
item.InvType = (int) reader["invType"];
|
||||||
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
|
item.BasePermissions = (uint) reader["inventoryBasePermissions"];
|
||||||
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
|
item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"];
|
||||||
|
item.GroupPermissions = (uint) reader["inventoryGroupPermissions"];
|
||||||
item.SalePrice = (int) reader["salePrice"];
|
item.SalePrice = (int) reader["salePrice"];
|
||||||
item.SaleType = Convert.ToByte(reader["saleType"]);
|
item.SaleType = Convert.ToByte(reader["saleType"]);
|
||||||
item.CreationDate = (int) reader["creationDate"];
|
item.CreationDate = (int) reader["creationDate"];
|
||||||
|
@ -455,12 +456,12 @@ namespace OpenSim.Data.MySQL
|
||||||
string sql =
|
string sql =
|
||||||
"REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName"
|
"REPLACE INTO inventoryitems (inventoryID, assetID, assetType, parentFolderID, avatarID, inventoryName"
|
||||||
+ ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType"
|
+ ", inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions, invType"
|
||||||
+ ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, salePrice, saleType"
|
+ ", creatorID, inventoryBasePermissions, inventoryEveryOnePermissions, inventoryGroupPermissions, salePrice, saleType"
|
||||||
+ ", creationDate, groupID, groupOwned, flags) VALUES ";
|
+ ", creationDate, groupID, groupOwned, flags) VALUES ";
|
||||||
sql +=
|
sql +=
|
||||||
"(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription"
|
"(?inventoryID, ?assetID, ?assetType, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription"
|
||||||
+ ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID"
|
+ ", ?inventoryNextPermissions, ?inventoryCurrentPermissions, ?invType, ?creatorID"
|
||||||
+ ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?salePrice, ?saleType, ?creationDate"
|
+ ", ?inventoryBasePermissions, ?inventoryEveryOnePermissions, ?inventoryGroupPermissions, ?salePrice, ?saleType, ?creationDate"
|
||||||
+ ", ?groupID, ?groupOwned, ?flags)";
|
+ ", ?groupID, ?groupOwned, ?flags)";
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -482,6 +483,7 @@ namespace OpenSim.Data.MySQL
|
||||||
result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
|
result.Parameters.AddWithValue("?creatorID", item.Creator.ToString());
|
||||||
result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
|
result.Parameters.AddWithValue("?inventoryBasePermissions", item.BasePermissions);
|
||||||
result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
|
result.Parameters.AddWithValue("?inventoryEveryOnePermissions", item.EveryOnePermissions);
|
||||||
|
result.Parameters.AddWithValue("?inventoryGroupPermissions", item.GroupPermissions);
|
||||||
result.Parameters.AddWithValue("?salePrice", item.SalePrice);
|
result.Parameters.AddWithValue("?salePrice", item.SalePrice);
|
||||||
result.Parameters.AddWithValue("?saleType", item.SaleType);
|
result.Parameters.AddWithValue("?saleType", item.SaleType);
|
||||||
result.Parameters.AddWithValue("?creationDate", item.CreationDate);
|
result.Parameters.AddWithValue("?creationDate", item.CreationDate);
|
||||||
|
|
|
@ -74,6 +74,11 @@ namespace OpenSim.Framework
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private uint _everyOnePermissions;
|
private uint _everyOnePermissions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
private uint _groupPermissions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The folder this item is contained in
|
/// The folder this item is contained in
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -190,6 +195,12 @@ namespace OpenSim.Framework
|
||||||
set { _everyOnePermissions = value; }
|
set { _everyOnePermissions = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint GroupPermissions
|
||||||
|
{
|
||||||
|
get { return _groupPermissions; }
|
||||||
|
set { _groupPermissions = value; }
|
||||||
|
}
|
||||||
|
|
||||||
public int AssetType
|
public int AssetType
|
||||||
{
|
{
|
||||||
get { return _assetType; }
|
get { return _assetType; }
|
||||||
|
|
|
@ -48,6 +48,6 @@ namespace OpenSim
|
||||||
/// of the code that is too old.
|
/// of the code that is too old.
|
||||||
///
|
///
|
||||||
/// </value>
|
/// </value>
|
||||||
public readonly static int MajorInterfaceVersion = 0;
|
public readonly static int MajorInterfaceVersion = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1561,10 +1561,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
descend.ItemData[i].OwnerID = item.Owner;
|
descend.ItemData[i].OwnerID = item.Owner;
|
||||||
descend.ItemData[i].Type = (sbyte)item.AssetType;
|
descend.ItemData[i].Type = (sbyte)item.AssetType;
|
||||||
|
|
||||||
//descend.ItemData[i].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
|
|
||||||
descend.ItemData[i].GroupID = item.GroupID;
|
descend.ItemData[i].GroupID = item.GroupID;
|
||||||
descend.ItemData[i].GroupOwned = item.GroupOwned;
|
descend.ItemData[i].GroupOwned = item.GroupOwned;
|
||||||
descend.ItemData[i].GroupMask = 0;
|
descend.ItemData[i].GroupMask = item.GroupPermissions;
|
||||||
descend.ItemData[i].CreationDate = item.CreationDate;
|
descend.ItemData[i].CreationDate = item.CreationDate;
|
||||||
descend.ItemData[i].SalePrice = item.SalePrice;
|
descend.ItemData[i].SalePrice = item.SalePrice;
|
||||||
descend.ItemData[i].SaleType = item.SaleType;
|
descend.ItemData[i].SaleType = item.SaleType;
|
||||||
|
@ -1708,10 +1707,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions;
|
inventoryReply.InventoryData[0].OwnerMask = item.CurrentPermissions;
|
||||||
inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType;
|
inventoryReply.InventoryData[0].Type = (sbyte)item.AssetType;
|
||||||
|
|
||||||
//inventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
|
|
||||||
inventoryReply.InventoryData[0].GroupID = item.GroupID;
|
inventoryReply.InventoryData[0].GroupID = item.GroupID;
|
||||||
inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned;
|
inventoryReply.InventoryData[0].GroupOwned = item.GroupOwned;
|
||||||
inventoryReply.InventoryData[0].GroupMask = 0;
|
inventoryReply.InventoryData[0].GroupMask = item.GroupPermissions;
|
||||||
inventoryReply.InventoryData[0].Flags = item.Flags;
|
inventoryReply.InventoryData[0].Flags = item.Flags;
|
||||||
inventoryReply.InventoryData[0].SalePrice = item.SalePrice;
|
inventoryReply.InventoryData[0].SalePrice = item.SalePrice;
|
||||||
inventoryReply.InventoryData[0].SaleType = item.SaleType;
|
inventoryReply.InventoryData[0].SaleType = item.SaleType;
|
||||||
|
@ -1763,10 +1761,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions;
|
bulkUpdate.ItemData[0].OwnerMask = item.CurrentPermissions;
|
||||||
bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType;
|
bulkUpdate.ItemData[0].Type = (sbyte)item.AssetType;
|
||||||
|
|
||||||
//bulkUpdate.ItemData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
|
|
||||||
bulkUpdate.ItemData[0].GroupID = item.GroupID;
|
bulkUpdate.ItemData[0].GroupID = item.GroupID;
|
||||||
bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
|
bulkUpdate.ItemData[0].GroupOwned = item.GroupOwned;
|
||||||
bulkUpdate.ItemData[0].GroupMask = 0;
|
bulkUpdate.ItemData[0].GroupMask = item.GroupPermissions;
|
||||||
bulkUpdate.ItemData[0].Flags = item.Flags;
|
bulkUpdate.ItemData[0].Flags = item.Flags;
|
||||||
bulkUpdate.ItemData[0].SalePrice = item.SalePrice;
|
bulkUpdate.ItemData[0].SalePrice = item.SalePrice;
|
||||||
bulkUpdate.ItemData[0].SaleType = item.SaleType;
|
bulkUpdate.ItemData[0].SaleType = item.SaleType;
|
||||||
|
@ -1811,10 +1808,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions;
|
InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions;
|
||||||
InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType;
|
InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType;
|
||||||
|
|
||||||
//InventoryReply.InventoryData[0].GroupID = new UUID("00000000-0000-0000-0000-000000000000");
|
|
||||||
InventoryReply.InventoryData[0].GroupID = Item.GroupID;
|
InventoryReply.InventoryData[0].GroupID = Item.GroupID;
|
||||||
InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
|
InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;
|
||||||
InventoryReply.InventoryData[0].GroupMask = 0;
|
InventoryReply.InventoryData[0].GroupMask = Item.GroupPermissions;
|
||||||
InventoryReply.InventoryData[0].Flags = Item.Flags;
|
InventoryReply.InventoryData[0].Flags = Item.Flags;
|
||||||
InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
|
InventoryReply.InventoryData[0].SalePrice = Item.SalePrice;
|
||||||
InventoryReply.InventoryData[0].SaleType = Item.SaleType;
|
InventoryReply.InventoryData[0].SaleType = Item.SaleType;
|
||||||
|
@ -5213,6 +5209,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
itemUpd.Description = Util.FieldToString(update.InventoryData[i].Description);
|
itemUpd.Description = Util.FieldToString(update.InventoryData[i].Description);
|
||||||
itemUpd.GroupID = update.InventoryData[i].GroupID;
|
itemUpd.GroupID = update.InventoryData[i].GroupID;
|
||||||
itemUpd.GroupOwned = update.InventoryData[i].GroupOwned;
|
itemUpd.GroupOwned = update.InventoryData[i].GroupOwned;
|
||||||
|
itemUpd.GroupPermissions = update.InventoryData[i].GroupMask;
|
||||||
itemUpd.NextPermissions = update.InventoryData[i].NextOwnerMask;
|
itemUpd.NextPermissions = update.InventoryData[i].NextOwnerMask;
|
||||||
itemUpd.EveryOnePermissions = update.InventoryData[i].EveryoneMask;
|
itemUpd.EveryOnePermissions = update.InventoryData[i].EveryoneMask;
|
||||||
itemUpd.CreationDate = update.InventoryData[i].CreationDate;
|
itemUpd.CreationDate = update.InventoryData[i].CreationDate;
|
||||||
|
@ -5419,6 +5416,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
|
item.CurrentPermissions = rezScriptx.InventoryBlock.OwnerMask;
|
||||||
item.EveryOnePermissions = rezScriptx.InventoryBlock.EveryoneMask;
|
item.EveryOnePermissions = rezScriptx.InventoryBlock.EveryoneMask;
|
||||||
item.NextPermissions = rezScriptx.InventoryBlock.NextOwnerMask;
|
item.NextPermissions = rezScriptx.InventoryBlock.NextOwnerMask;
|
||||||
|
item.GroupPermissions = rezScriptx.InventoryBlock.GroupMask;
|
||||||
item.GroupOwned = rezScriptx.InventoryBlock.GroupOwned;
|
item.GroupOwned = rezScriptx.InventoryBlock.GroupOwned;
|
||||||
item.GroupID = rezScriptx.InventoryBlock.GroupID;
|
item.GroupID = rezScriptx.InventoryBlock.GroupID;
|
||||||
item.AssetType = rezScriptx.InventoryBlock.Type;
|
item.AssetType = rezScriptx.InventoryBlock.Type;
|
||||||
|
|
|
@ -293,6 +293,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
|
||||||
item.Folder = InventFolder;
|
item.Folder = InventFolder;
|
||||||
item.BasePermissions = 0x7fffffff;
|
item.BasePermissions = 0x7fffffff;
|
||||||
item.CurrentPermissions = 0x7fffffff;
|
item.CurrentPermissions = 0x7fffffff;
|
||||||
|
item.GroupPermissions=0;
|
||||||
item.EveryOnePermissions=0;
|
item.EveryOnePermissions=0;
|
||||||
item.NextPermissions = nextPerm;
|
item.NextPermissions = nextPerm;
|
||||||
item.Flags = (uint) wearableType;
|
item.Flags = (uint) wearableType;
|
||||||
|
|
|
@ -355,11 +355,11 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.NextPermissions = itemUpd.NextPermissions;
|
item.NextPermissions = itemUpd.NextPermissions;
|
||||||
item.CurrentPermissions |= 8; // Slam!
|
item.CurrentPermissions |= 8; // Slam!
|
||||||
item.EveryOnePermissions = itemUpd.EveryOnePermissions;
|
item.EveryOnePermissions = itemUpd.EveryOnePermissions;
|
||||||
|
item.GroupPermissions = itemUpd.GroupPermissions;
|
||||||
|
|
||||||
// TODO: Requires sanity checks
|
item.GroupID = itemUpd.GroupID;
|
||||||
//item.GroupID = itemUpd.GroupID;
|
item.GroupOwned = itemUpd.GroupOwned;
|
||||||
//item.GroupOwned = itemUpd.GroupOwned;
|
item.CreationDate = itemUpd.CreationDate;
|
||||||
//item.CreationDate = itemUpd.CreationDate;
|
|
||||||
// The client sends zero if its newly created?
|
// The client sends zero if its newly created?
|
||||||
|
|
||||||
if (itemUpd.CreationDate == 0)
|
if (itemUpd.CreationDate == 0)
|
||||||
|
@ -480,12 +480,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
itemCopy.NextPermissions = item.NextPermissions;
|
itemCopy.NextPermissions = item.NextPermissions;
|
||||||
itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
|
itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
|
||||||
|
itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
itemCopy.CurrentPermissions = item.CurrentPermissions;
|
itemCopy.CurrentPermissions = item.CurrentPermissions;
|
||||||
itemCopy.NextPermissions = item.NextPermissions;
|
itemCopy.NextPermissions = item.NextPermissions;
|
||||||
itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
|
itemCopy.EveryOnePermissions = item.EveryOnePermissions & item.NextPermissions;
|
||||||
|
itemCopy.GroupPermissions = item.GroupPermissions & item.NextPermissions;
|
||||||
itemCopy.BasePermissions = item.BasePermissions;
|
itemCopy.BasePermissions = item.BasePermissions;
|
||||||
}
|
}
|
||||||
itemCopy.GroupID = UUID.Zero;
|
itemCopy.GroupID = UUID.Zero;
|
||||||
|
@ -584,13 +586,13 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
CreateNewInventoryItem(
|
CreateNewInventoryItem(
|
||||||
remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
|
remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
|
||||||
item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, Util.UnixTimeSinceEpoch());
|
item.BasePermissions, item.CurrentPermissions, item.EveryOnePermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CreateNewInventoryItem(
|
CreateNewInventoryItem(
|
||||||
remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
|
remoteClient, newFolderID, newName, item.Flags, callbackID, asset, (sbyte)item.InvType,
|
||||||
item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, Util.UnixTimeSinceEpoch());
|
item.NextPermissions, item.NextPermissions, item.EveryOnePermissions & item.NextPermissions, item.NextPermissions, item.GroupPermissions, Util.UnixTimeSinceEpoch());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -690,7 +692,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
CreateNewInventoryItem(
|
CreateNewInventoryItem(
|
||||||
remoteClient, folderID, name, flags, callbackID, asset, invType,
|
remoteClient, folderID, name, flags, callbackID, asset, invType,
|
||||||
(uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, creationDate);
|
(uint)PermissionMask.All, (uint)PermissionMask.All, 0, nextOwnerMask, 0, creationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -705,7 +707,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="creationDate"></param>
|
/// <param name="creationDate"></param>
|
||||||
private void CreateNewInventoryItem(
|
private void CreateNewInventoryItem(
|
||||||
IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
|
IClientAPI remoteClient, UUID folderID, string name, uint flags, uint callbackID, AssetBase asset, sbyte invType,
|
||||||
uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, int creationDate)
|
uint baseMask, uint currentMask, uint everyoneMask, uint nextOwnerMask, uint groupMask, int creationDate)
|
||||||
{
|
{
|
||||||
CachedUserInfo userInfo
|
CachedUserInfo userInfo
|
||||||
= CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
= CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||||
|
@ -726,6 +728,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = currentMask;
|
item.CurrentPermissions = currentMask;
|
||||||
item.NextPermissions = nextOwnerMask;
|
item.NextPermissions = nextOwnerMask;
|
||||||
item.EveryOnePermissions = everyoneMask;
|
item.EveryOnePermissions = everyoneMask;
|
||||||
|
item.GroupPermissions = groupMask;
|
||||||
item.BasePermissions = baseMask;
|
item.BasePermissions = baseMask;
|
||||||
item.CreationDate = creationDate;
|
item.CreationDate = creationDate;
|
||||||
|
|
||||||
|
@ -978,6 +981,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
agentItem.CurrentPermissions = taskItem.NextPermissions | 8;
|
agentItem.CurrentPermissions = taskItem.NextPermissions | 8;
|
||||||
agentItem.NextPermissions = taskItem.NextPermissions;
|
agentItem.NextPermissions = taskItem.NextPermissions;
|
||||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
|
agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions;
|
||||||
|
agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -985,6 +989,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
agentItem.CurrentPermissions = taskItem.CurrentPermissions;
|
agentItem.CurrentPermissions = taskItem.CurrentPermissions;
|
||||||
agentItem.NextPermissions = taskItem.NextPermissions;
|
agentItem.NextPermissions = taskItem.NextPermissions;
|
||||||
agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
|
agentItem.EveryOnePermissions = taskItem.EveryonePermissions;
|
||||||
|
agentItem.GroupPermissions = taskItem.GroupPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||||
|
@ -1416,6 +1421,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
taskItem.BasePermissions = itemBase.BasePermissions;
|
taskItem.BasePermissions = itemBase.BasePermissions;
|
||||||
taskItem.CurrentPermissions = itemBase.CurrentPermissions;
|
taskItem.CurrentPermissions = itemBase.CurrentPermissions;
|
||||||
taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
|
taskItem.EveryonePermissions = itemBase.EveryOnePermissions;
|
||||||
|
taskItem.GroupPermissions = itemBase.GroupPermissions;
|
||||||
taskItem.NextPermissions = itemBase.NextPermissions;
|
taskItem.NextPermissions = itemBase.NextPermissions;
|
||||||
taskItem.GroupID = itemBase.GroupID;
|
taskItem.GroupID = itemBase.GroupID;
|
||||||
taskItem.GroupPermissions = 0;
|
taskItem.GroupPermissions = 0;
|
||||||
|
@ -1728,6 +1734,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = item.BasePermissions;
|
item.CurrentPermissions = item.BasePermissions;
|
||||||
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
|
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
|
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask & objectGroup.RootPart.NextOwnerMask;
|
||||||
|
item.GroupPermissions = objectGroup.RootPart.GroupMask & objectGroup.RootPart.NextOwnerMask;
|
||||||
item.CurrentPermissions |= 8; // Slam!
|
item.CurrentPermissions |= 8; // Slam!
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1736,6 +1743,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = objectGroup.GetEffectivePermissions();
|
item.CurrentPermissions = objectGroup.GetEffectivePermissions();
|
||||||
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
|
item.NextPermissions = objectGroup.RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
|
item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask;
|
||||||
|
item.GroupPermissions = objectGroup.RootPart.GroupMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add the new fields (Flags, Sale info, etc)
|
// TODO: add the new fields (Flags, Sale info, etc)
|
||||||
|
@ -1876,6 +1884,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = grp.RootPart.NextOwnerMask;
|
item.CurrentPermissions = grp.RootPart.NextOwnerMask;
|
||||||
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
|
item.EveryOnePermissions = grp.RootPart.EveryoneMask & grp.RootPart.NextOwnerMask;
|
||||||
|
item.GroupPermissions = grp.RootPart.GroupMask & grp.RootPart.NextOwnerMask;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1883,6 +1892,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = grp.RootPart.OwnerMask;
|
item.CurrentPermissions = grp.RootPart.OwnerMask;
|
||||||
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
item.NextPermissions = grp.RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = grp.RootPart.EveryoneMask;
|
item.EveryOnePermissions = grp.RootPart.EveryoneMask;
|
||||||
|
item.GroupPermissions = grp.RootPart.GroupMask;
|
||||||
}
|
}
|
||||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||||
|
|
||||||
|
@ -2041,6 +2051,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
part.EveryoneMask = item.EveryOnePermissions;
|
part.EveryoneMask = item.EveryOnePermissions;
|
||||||
part.NextOwnerMask = item.NextPermissions;
|
part.NextOwnerMask = item.NextPermissions;
|
||||||
|
part.GroupMask = 0; // DO NOT propagate here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
group.ApplyNextOwnerPermissions();
|
group.ApplyNextOwnerPermissions();
|
||||||
|
@ -2059,6 +2070,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
part.EveryoneMask = item.EveryOnePermissions;
|
part.EveryoneMask = item.EveryOnePermissions;
|
||||||
part.NextOwnerMask = item.NextPermissions;
|
part.NextOwnerMask = item.NextPermissions;
|
||||||
|
|
||||||
|
part.GroupMask = 0; // DO NOT propagate here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2282,6 +2295,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = item.BasePermissions;
|
item.CurrentPermissions = item.BasePermissions;
|
||||||
item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
|
item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask & returnobjects[i].RootPart.NextOwnerMask;
|
item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask & returnobjects[i].RootPart.NextOwnerMask;
|
||||||
|
item.GroupPermissions = returnobjects[i].RootPart.GroupMask & returnobjects[i].RootPart.NextOwnerMask;
|
||||||
item.CurrentPermissions |= 8; // Slam!
|
item.CurrentPermissions |= 8; // Slam!
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2290,6 +2304,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.CurrentPermissions = returnobjects[i].GetEffectivePermissions();
|
item.CurrentPermissions = returnobjects[i].GetEffectivePermissions();
|
||||||
item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
|
item.NextPermissions = returnobjects[i].RootPart.NextOwnerMask;
|
||||||
item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask;
|
item.EveryOnePermissions = returnobjects[i].RootPart.EveryoneMask;
|
||||||
|
item.GroupPermissions = returnobjects[i].RootPart.GroupMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: add the new fields (Flags, Sale info, etc)
|
// TODO: add the new fields (Flags, Sale info, etc)
|
||||||
|
|
|
@ -4301,6 +4301,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.NextPermissions = part.NextOwnerMask;
|
item.NextPermissions = part.NextOwnerMask;
|
||||||
item.EveryOnePermissions = part.EveryoneMask &
|
item.EveryOnePermissions = part.EveryoneMask &
|
||||||
part.NextOwnerMask;
|
part.NextOwnerMask;
|
||||||
|
item.GroupPermissions = part.GroupMask &
|
||||||
|
part.NextOwnerMask;
|
||||||
item.CurrentPermissions |= 8; // Slam!
|
item.CurrentPermissions |= 8; // Slam!
|
||||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||||
|
|
||||||
|
|
|
@ -166,6 +166,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
item.NextPermissions;
|
item.NextPermissions;
|
||||||
taskItem.EveryonePermissions = item.EveryOnePermissions &
|
taskItem.EveryonePermissions = item.EveryOnePermissions &
|
||||||
item.NextPermissions;
|
item.NextPermissions;
|
||||||
|
taskItem.GroupPermissions = item.GroupPermissions &
|
||||||
|
item.NextPermissions;
|
||||||
taskItem.NextPermissions = item.NextPermissions;
|
taskItem.NextPermissions = item.NextPermissions;
|
||||||
taskItem.CurrentPermissions |= 8;
|
taskItem.CurrentPermissions |= 8;
|
||||||
} else {
|
} else {
|
||||||
|
@ -173,6 +175,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
taskItem.CurrentPermissions = item.CurrentPermissions;
|
taskItem.CurrentPermissions = item.CurrentPermissions;
|
||||||
taskItem.CurrentPermissions |= 8;
|
taskItem.CurrentPermissions |= 8;
|
||||||
taskItem.EveryonePermissions = item.EveryOnePermissions;
|
taskItem.EveryonePermissions = item.EveryOnePermissions;
|
||||||
|
taskItem.GroupPermissions = item.GroupPermissions;
|
||||||
taskItem.NextPermissions = item.NextPermissions;
|
taskItem.NextPermissions = item.NextPermissions;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue