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

Respect authorisation request opt-out on workspace start #576

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

vinokurig
Copy link
Contributor

@vinokurig vinokurig commented Oct 5, 2023

What does this PR do?

If user rejects an scm provider authorisation request while creating or starting existed workspace store the name of the scm provider in the workspace-preferences config-map. The workspace create/start step must proceed without token fetch step. If user creates another workspace or starts existed workspace from an scm provider which name is stored in the config-map, do not ask the authorisation as it was already rejected once.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

eclipse-che/che#22499

How to test this PR?

  1. Deploy che from the PR image: quay.io/eclipse/che-server:pr-576
  2. Setup GitHub oauth flow
  3. Start a workspace from a public GitHub repository url.
  4. When the authorisation page opens, click the cancel button.
  5. When workspace starts, stop it and then start it, see: workspace starts without asking the authorisation.
  6. Delete the workspace and create it again, see: workspace starts without asking the authorisation.

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@vinokurig
Copy link
Contributor Author

/retest

3 similar comments
@vinokurig
Copy link
Contributor Author

/retest

@vinokurig
Copy link
Contributor Author

/retest

@vinokurig
Copy link
Contributor Author

/retest

@vinokurig
Copy link
Contributor Author

/retest

Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

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

Code generally looks good to me, though I haven't been able to test the changes.

@vinokurig
Copy link
Contributor Author

/retest

@vinokurig
Copy link
Contributor Author

/retest

1 similar comment
@vinokurig
Copy link
Contributor Author

/retest

@artaleks9
Copy link
Contributor

Verified according to steps in the How to test this PR? - the functionality works properly.

@openshift-ci
Copy link

openshift-ci bot commented Oct 12, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: amisevsk, artaleks9, ibuziuk, vinokurig

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vinokurig vinokurig merged commit 148415c into main Oct 12, 2023
7 checks passed
@vinokurig vinokurig deleted the che-22499 branch October 12, 2023 12:59
@devstudio-release
Copy link

Build 3.10 :: server_3.x/257: Console, Changes, Git Data

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: server_3.x/257: SUCCESS

Upstream sync done; /DS_CI/sync-to-downstream_3.x/4928 triggered

@devstudio-release
Copy link

@devstudio-release
Copy link

Build 3.10 :: update-digests_3.x/4589: UNSTABLE

No new images detected: nothing to do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants