MakeOspa() public static method

Make an OSPA given a user UUID
public static MakeOspa ( UUID userId, IUserAccountService userService ) : string
userId UUID
userService IUserAccountService
return string
Exemplo n.º 1
0
        protected void SaveInvItem(InventoryItemBase inventoryItem, string path)
        {
            // Check For Permissions Filter Flags
            if (!CanUserArchiveObject(m_userInfo.PrincipalID, inventoryItem))
            {
                MainConsole.Instance.InfoFormat(
                    "[Inventory Archiver]: Insufficient permissions, skipping inventory item {0} {1} at {2}",
                    inventoryItem.Name, inventoryItem.ID, path);

                // Count Items Excluded
                CountFiltered++;

                return;
            }

            string filename = path + CreateArchiveItemName(inventoryItem);

            // Record the creator of this item for user record purposes (which might go away soon)
            m_userUuids[inventoryItem.CreatorIdAsUuid] = 1;

            InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone();

            saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_accountService);

            string serialization = UserInventoryItemSerializer.Serialize(saveItem);

            m_archiveWriter.WriteFile(filename, serialization);

            //        m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType) saveItem.AssetType, m_assetUuids);
            AssetType itemAssetType = (AssetType)inventoryItem.AssetType;

            // Don't chase down link asset items as they actually point to their target item IDs rather than an asset
            if (m_saveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder)
            {
                m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids);
            }
        }