mirror of
https://github.com/go-gitea/gitea.git
synced 2026-11-19 15:14:40 +09:00
Adds an instance-level `DEFAULT_TEAM_VISIBILITY` setting (`private`/`limited`/`public`, default `private`) so administrators can configure the default visibility for newly created teams when it isn't explicitly chosen in the web form or sent via the API. Also fixes a template bug where the "Private" radio was always force-checked on the new-team page regardless of the actual default. Fixes: https://github.com/go-gitea/gitea/issues/40128 ## Verification Tested all three config values (absent/`private`, `public`, `limited`) against both the web form default and the API (`POST /orgs/{org}/teams` without `visibility`) — in each case the correct default was applied. ## Test 1: Key absent in app.ini -> falls back to "private" <img width="3178" height="1312" alt="image" src="https://github.com/user-attachments/assets/7ce87372-eb3e-4f03-84da-fc21ace86eca" /> ## Test 2: DEFAULT_TEAM_VISIBILITY = public <img width="2802" height="1348" alt="image" src="https://github.com/user-attachments/assets/aa1af297-9557-434d-82c6-1af253eec2ab" /> ## Test 3: DEFAULT_TEAM_VISIBILITY = limited <img width="2778" height="1198" alt="image" src="https://github.com/user-attachments/assets/1e66565b-c275-454a-a7d1-66d11ef3b9ee" /> --------- Co-authored-by: silverwind <me@silverwind.io>