mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Revert "Don't load current/next/everyone/base permissions from the library item xml files - always use PermissionMask.All instead (which was the existing default)."
There actually are uses for this. I will correct the perms instead since some entries appear to be wrong.
This reverts commit 667b54f5a2.
This commit is contained in:
@@ -93,6 +93,26 @@ namespace OpenSim.Services.InventoryService
|
||||
LoadLibraries(pLibrariesLocation);
|
||||
}
|
||||
|
||||
public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
|
||||
int assetType, int invType, UUID parentFolderID)
|
||||
{
|
||||
InventoryItemBase item = new InventoryItemBase();
|
||||
item.Owner = libOwner;
|
||||
item.CreatorId = libOwner.ToString();
|
||||
item.ID = inventoryID;
|
||||
item.AssetID = assetID;
|
||||
item.Description = description;
|
||||
item.Name = name;
|
||||
item.AssetType = assetType;
|
||||
item.InvType = invType;
|
||||
item.Folder = parentFolderID;
|
||||
item.BasePermissions = 0x7FFFFFFF;
|
||||
item.EveryOnePermissions = 0x7FFFFFFF;
|
||||
item.CurrentPermissions = 0x7FFFFFFF;
|
||||
item.NextPermissions = 0x7FFFFFFF;
|
||||
return item;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use the asset set information at path to load assets
|
||||
/// </summary>
|
||||
@@ -173,27 +193,22 @@ namespace OpenSim.Services.InventoryService
|
||||
item.Description = config.GetString("description", item.Name);
|
||||
item.InvType = config.GetInt("inventoryType", 0);
|
||||
item.AssetType = config.GetInt("assetType", item.InvType);
|
||||
item.CurrentPermissions = (uint)PermissionMask.All;
|
||||
item.NextPermissions = (uint)PermissionMask.All;
|
||||
item.EveryOnePermissions = (uint)PermissionMask.All;
|
||||
// item.EveryOnePermissions = (uint)PermissionMask.All - (uint)PermissionMask.Modify;
|
||||
item.BasePermissions = (uint)PermissionMask.All;
|
||||
item.CurrentPermissions = (uint)config.GetLong("currentPermissions", 0x7FFFFFFF);
|
||||
item.NextPermissions = (uint)config.GetLong("nextPermissions", 0x7FFFFFFF);
|
||||
item.EveryOnePermissions = (uint)config.GetLong("everyonePermissions", 0x7FFFFFFF);
|
||||
item.BasePermissions = (uint)config.GetLong("basePermissions", 0x7FFFFFFF);
|
||||
item.Flags = (uint)config.GetInt("flags", 0);
|
||||
|
||||
if (libraryFolders.ContainsKey(item.Folder))
|
||||
{
|
||||
InventoryFolderImpl parentFolder = libraryFolders[item.Folder];
|
||||
|
||||
try
|
||||
{
|
||||
// m_log.DebugFormat(
|
||||
// "[LIBRARY INVENTORY]: Adding item {0} {1}, OwnerPermissions {2:X} to {3}",
|
||||
// item.Name, item.ID, item.CurrentPermissions, item.Folder);
|
||||
|
||||
parentFolder.Items.Add(item.ID, item);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
m_log.WarnFormat("[LIBRARY INVENTORY]: Item {1} [{0}] not added, duplicate item", item.ID, item.Name);
|
||||
m_log.WarnFormat("[LIBRARY INVENTORY] Item {1} [{0}] not added, duplicate item", item.ID, item.Name);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user