コード例 #1
0
        public void MoveFolder(UUID userId, UUID folderId, UUID parentId)
        {
            //retrieve both folders and verify the owners match
            InventoryFolderBase subjectFolder   = _storage.GetFolderAttributes(folderId);
            InventoryFolderBase newParentFolder = _storage.GetFolderAttributes(parentId);

            if (subjectFolder.Owner != userId || newParentFolder.Owner != userId)
            {
                throw new InventorySecurityException(String.Format("Not moving folder {0} for user {1}. User does not own the folder", subjectFolder.ID, userId));
            }

            _storage.MoveFolder(subjectFolder, parentId);
        }