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

Allow Ports in Git Provider Endpoint for Dashboard - Personal Access Tokens #23013

Closed
dlsiddon opened this issue Jun 22, 2024 · 2 comments · Fixed by eclipse-che/che-dashboard#1140
Assignees
Labels
area/dashboard good first issue Community, this issue looks easy to start with for a new contributor. Just take it. We'll help you! kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@dlsiddon
Copy link

Is your enhancement related to a problem? Please describe

Currently adding a personal access token in the dashboard user preferences section does not allow adding a port number to the URL. Our enterprise currently has bitbucket installed and bound to a port other than 443. I believe this is due to sanitation here
https://github.com/eclipse-che/che-dashboard/blob/28abf62c50c55e0bebc48ca98be9e5b70921548b/packages/dashboard-frontend/src/pages/UserPreferences/PersonalAccessTokens/AddEditModal/Form/GitProviderEndpoint/index.tsx#L102

image

Describe the solution you'd like

Expanding the regex to allow ports in the Git Provider Endpoint field.

Maybe this regex will work:
/^https?:\/\/(?:(?:[a-z\d]+(?:-[a-z\d]+)*)\.)+[a-z]{2,}(?::\d+)?(?:\/[^\s]*)?$/i

Describe alternatives you've considered

I was able to create the necessary token through oc commands in our openshift environment following the instructions here but editing/adding in the dashboard ui does not allow submitting of the form when a port is in the url.

Additional context

No response

@dlsiddon dlsiddon added the kind/enhancement A feature request - must adhere to the feature request template. label Jun 22, 2024
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 22, 2024
@ibuziuk
Copy link
Member

ibuziuk commented Jun 24, 2024

@dlsiddon thanks for reporting, would you be interested in providing a PR with a fix to https://github.com/eclipse-che/che-dashboard with validation improvement ?
@olexii4 looks like smth. we should tune on the dashboard validation end.

@ibuziuk ibuziuk added severity/P1 Has a major impact to usage or development of the system. severity/P2 Has a minor but important impact to the usage or development of the system. area/dashboard good first issue Community, this issue looks easy to start with for a new contributor. Just take it. We'll help you! and removed severity/P1 Has a major impact to usage or development of the system. status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jun 24, 2024
@dlsiddon
Copy link
Author

dlsiddon commented Jun 25, 2024

@ibuziuk I'll see if I can do all of the requirements of the PR. I have a personal fork with what i think are the proper changes, but looks like there is some setup for proper PR submission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard good first issue Community, this issue looks easy to start with for a new contributor. Just take it. We'll help you! kind/enhancement A feature request - must adhere to the feature request template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants