Skip to content

repo: enforce forced private in settings - #8362

Open
ifer47 wants to merge 1 commit into
gogs:mainfrom
ifer47:repo-respect-force-private-settings-v2
Open

repo: enforce forced private in settings#8362
ifer47 wants to merge 1 commit into
gogs:mainfrom
ifer47:repo-respect-force-private-settings-v2

Conversation

@ifer47

@ifer47 ifer47 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Describe the pull request

FORCE_PRIVATE already forces new repositories to be created as private, but regular users can still submit the repository settings form with private unchecked and make an existing repository public. This updates the settings save path so non-admin users cannot make repositories public while FORCE_PRIVATE is enabled. It also keeps the existing fork visibility synchronization behavior and adds tests for the visibility normalization rules.

Link to the issue: #8186

Checklist

  • I agree to follow the Code of Conduct by submitting this pull request.
  • I have read and acknowledge the Contributing guide.
  • I have added test cases to cover the new code or have provided the test plan. (if applicable)
  • I have added an entry to CHANGELOG. (if applicable)

Test plan

  • go test ./internal/route/repo

@ifer47
ifer47 requested a review from unknwon as a code owner June 10, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant