Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.

SharedDirectoryReadRequest#1003

Merged
ibeckermayer merged 51 commits intomasterfrom
isaiah/sd-read-request
Jul 27, 2022
Merged

SharedDirectoryReadRequest#1003
ibeckermayer merged 51 commits intomasterfrom
isaiah/sd-read-request

Conversation

@ibeckermayer
Copy link
Copy Markdown

Adds SharedDirectoryReadRequest

Requires backport to v9/v10

How to test manually

webapps

  1. Change the value below to true
    enableDirectorySharing: false, // note to reviewers: should be false in any PRs.
  2. run the development server like yarn start-teleport --target=https://ec2-35-171-27-185.compute-1.amazonaws.com/
  3. See https://gravitational.slack.com/archives/C02DQ1C2BMW/p1657807702085829 for a username/password combo

What to expect

Go to the top right ... menu and click Share Directory

image

(X-out of the "uncaught exception" screen if you get it). The directory you select should show up in the File Explorer as a shared drive

Screen Shot 2022-07-19 at 14 13 45

The drive should be navigable as well should any folders within it

image

Trying to open a file should result in something like the following in the debug console

image

Isaiah Becker-Mayer added 30 commits July 6, 2022 15:53
};
}

// | message type (19) | completion_id uint32 | directory_id uint32 | path_length uint32 | path []byte | offset uint64 | length uint32 |
Copy link
Copy Markdown
Contributor

@JanKaczmarkiewicz JanKaczmarkiewicz Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[out of scope, discussion]
If we will add more request types I think we should create some simple utilities eg:

const sharedDirectoryReadRequestSchema = createSchema({
   completion_id: uint32,
   directory_id: uint32,
   path_length: uint32,
   path: byteArray,
   offset: uint64,
   length: uint32
});

export type SharedDirectoryReadRequest = ReturnType<typeof sharedDirectoryReadRequestSchema.tryParse>;

const data = sharedDirectoryReadRequestSchema.tryParse(buffer);

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I'm understanding correctly. createSchema is returning a class which generates this decodeSharedDirectoryReadRequest function (as tryParse)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibeckermayer ibeckermayer changed the base branch from isaiah/sd-list-response to master July 27, 2022 22:56
@ibeckermayer ibeckermayer enabled auto-merge (squash) July 27, 2022 23:05
@ibeckermayer ibeckermayer merged commit ad6189e into master Jul 27, 2022
ibeckermayer pushed a commit that referenced this pull request Aug 23, 2022
ibeckermayer pushed a commit that referenced this pull request Aug 24, 2022
* `SharedDirectoryInfoResponse` (#996)

* `SharedDirectoryListRequest` (#999)

* `SharedDirectoryListResponse` (#1000)

* `SharedDirectoryReadRequest` (#1003)

* `SharedDirectoryReadResponse` (#1005)

* `SharedDirectoryWriteRequest` (#1007)

* `SharedDirectoryWriteResponse` (#1008)

* Tidy up `sharedDirectoryManager` (#1010)

* `SharedDirectoryMoveRequest` (#1045)

* `SharedDirectoryMoveResponse` (#1074)

* `SharedDirectoryCreateRequest` and `SharedDirectoryCreateResponse` (#1090)

* SharedDirectoryDeleteRequest and SharedDirectoryDeleteResponse (#1096)

* Add warning dialog for unsupported browsers for directory sharing (#1110)

* updates yarn.lock
@zmb3 zmb3 deleted the isaiah/sd-read-request branch August 24, 2022 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants