Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable file transfer buttons if user lacks permissions #49892

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

avatus
Copy link
Contributor

@avatus avatus commented Dec 6, 2024

This will disable the upload/download buttons in the web terminal if the user does not have the role option ssh_file_copy

Screenshot 2024-12-05 at 5 15 44 PM

Fixes: #26235

I have intentionally not fixed in Connect yet because the ACL changes there are bit more involved and I think warrants a separate PR.

This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
@avatus avatus added backport-required no-changelog Indicates that a PR does not require a changelog entry backport/branch/v16 backport/branch/v17 labels Dec 6, 2024
@avatus avatus requested review from ryanclark and removed request for ravicious December 6, 2024 18:03

import DocumentSsh from '.';

test('file transfer buttons are disabled if user does not have access', async () => {
Copy link
Contributor Author

@avatus avatus Dec 6, 2024

Choose a reason for hiding this comment

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

this component didn't have any tests at all previously. I've created the tests file and only added tests relevant to this PR

avatus added a commit that referenced this pull request Dec 6, 2024
Backport #49892

Manual backport due to all the changes that have happened to roles
lately (and some missing components)
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from ryanclark December 6, 2024 19:03
@avatus avatus added this pull request to the merge queue Dec 6, 2024
Merged via the queue into master with commit eea8292 Dec 6, 2024
46 of 47 checks passed
@avatus avatus deleted the avatus/scpnono branch December 6, 2024 19:33
@public-teleport-github-review-bot

@avatus See the table below for backport results.

Branch Result
branch/v16 Failed
branch/v17 Failed

avatus added a commit that referenced this pull request Dec 9, 2024
This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
avatus added a commit that referenced this pull request Dec 9, 2024
This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
avatus added a commit that referenced this pull request Dec 9, 2024
This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
github-merge-queue bot pushed a commit that referenced this pull request Dec 9, 2024
)

This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
github-merge-queue bot pushed a commit that referenced this pull request Dec 9, 2024
)

This will disable the upload/download buttons in the web terminal if the
user does not have the role option `ssh_file_copy`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide or gray-out upload/download icons in SSH Sessions when not allowed
3 participants