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 run user change in installation page #22499

Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 18, 2023

The run user should not be changed on the installation page because it will not be any effect to Gitea.

This PR disabled the input box of run user.

@lunny lunny force-pushed the lunny/disable_change_run_user_instllation branch from b008ab3 to 7a47420 Compare July 5, 2023 08:22
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 5, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jul 5, 2023
@lunny lunny changed the title WIP: Disable run user change in installation page Disable run user change in installation page Jul 5, 2023
@lunny lunny added topic/ui Change the appearance of the Gitea UI type/miscellaneous labels Jul 5, 2023
@lunny lunny added this to the 1.21.0 milestone Jul 5, 2023
@wolfogre
Copy link
Member

wolfogre commented Jul 5, 2023

So it's not modifiable:

currentUser, match := setting.IsRunUserMatchCurrentUser(form.RunUser)
if !match {
ctx.Data["Err_RunUser"] = true
ctx.RenderWithErr(ctx.Tr("install.run_user_not_match", form.RunUser, currentUser), tplInstall, &form)
return
}

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 5, 2023
templates/install.tmpl Outdated Show resolved Hide resolved
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

As a quick patch, it works.

Ideally, the backend code should remove the "from.RunUser" usage.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 5, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 5, 2023
@lunny lunny merged commit d17a848 into go-gitea:main Jul 6, 2023
23 checks passed
@lunny lunny deleted the lunny/disable_change_run_user_instllation branch July 6, 2023 02:14
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 6, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 6, 2023
* giteaofficial/main:
  Disable run user change in installation page (go-gitea#22499)
  [skip ci] Updated translations via Crowdin
  Show correct naming for 1 comment (go-gitea#25704)
  Check `ctx.Written()` for `GetActionIssue` (go-gitea#25698)
  Changelog for v1.19.4 (go-gitea#25667) (go-gitea#25709)
  Remove `feature` label from `feature request` issue template (go-gitea#25696)
  Fix tags header and pretty format numbers (go-gitea#25624)
  Fix position of org follow button (go-gitea#25688)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. topic/ui Change the appearance of the Gitea UI type/miscellaneous
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants