Skip to content

Require additional user confirmation for making repo private#36959

Merged
techknowlogick merged 12 commits into
go-gitea:mainfrom
techknowlogick:dangerzone-private-enhancement
Mar 24, 2026
Merged

Require additional user confirmation for making repo private#36959
techknowlogick merged 12 commits into
go-gitea:mainfrom
techknowlogick:dangerzone-private-enhancement

Conversation

@techknowlogick
Copy link
Copy Markdown
Member

To align with how GitHub requires additional explicit user interaction to make a repo private, including informing them of implications on what happens if they do.

@techknowlogick techknowlogick added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Mar 23, 2026
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 23, 2026
Comment thread templates/repo/settings/options.tmpl Outdated
Comment thread templates/repo/settings/repo_name_confirm_fields.tmpl Outdated
Comment thread templates/repo/settings/repo_name_confirm_fields.tmpl
}

func TestRepositoryVisibilityChangeToPublicDoesNotRequireName(t *testing.T) {
onGiteaRun(t, func(t *testing.T, u *url.URL) {
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.

Why it needs onGiteaRun? Why these 2 tests can't be done in one test (one preparation)?

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.

This review was marked as resolved, but not addressed.

I removed the onGiteaRun in new commits and the tests still run correctly.

Comment thread templates/base/modal_actions_confirm.tmpl Outdated
@bircni
Copy link
Copy Markdown
Member

bircni commented Mar 23, 2026

Do you have an UI example?

@wxiaoguang wxiaoguang marked this pull request as draft March 23, 2026 15:36
@techknowlogick
Copy link
Copy Markdown
Member Author

Here is a screenshot of what the modal looks like, prompting the user to type in fully username/repo:
A screenshot of the modal for making a repo private showing stats of how many watchers/stars/forks it has, along with a field to prompt the user to type in the username and repo fully to explicitly confirm their action

@techknowlogick techknowlogick marked this pull request as ready for review March 23, 2026 20:39
@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 Mar 23, 2026
@lunny lunny added this to the 1.26.0 milestone Mar 23, 2026
Comment thread templates/repo/settings/options.tmpl Outdated
Signed-off-by: techknowlogick <matti@mdranta.net>
Comment thread tests/integration/repo_visibility_test.go Outdated
@wxiaoguang
Copy link
Copy Markdown
Contributor

wxiaoguang commented Mar 24, 2026

Here is a screenshot of what the modal looks like, prompting the user to type in fully username/repo:

Old UI on main branch

image

This PR's old UI

image

New UI

image

@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 Mar 24, 2026
@techknowlogick techknowlogick enabled auto-merge (squash) March 24, 2026 19:42
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 24, 2026
@techknowlogick techknowlogick merged commit 943ff75 into go-gitea:main Mar 24, 2026
26 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants