1f614953a2
enhance: allow admins to force user activity visibility ( #40002 )
...
Adds `[service] FORCE_USER_ACTIVITY_VISIBILITY` so admins can force the
activity of all users to be `public` or `private`, e.g. for company
instances that require public activity.
- When the value changes, the next start overwrites the "Hide Activity"
setting of all users. New users get the forced value too.
- The "Hide Activity" checkbox is disabled with an explanatory tooltip
while forced, and `PATCH /api/v1/user/settings` rejects a conflicting
`hide_activity` with 422.
| Before | After |
| --- | --- |
| <img width="122" height="17" alt="before"
src="https://github.com/user-attachments/assets/d138acec-5d40-4a0a-881c-0097e5197a8f "
/> | <img width="258" height="46" alt="after"
src="https://github.com/user-attachments/assets/7e8f7d1b-3303-4473-8d3b-aa35ef8fb20d "
/> |
Fixes: https://github.com/go-gitea/gitea/issues/37961
Assisted-by: Claude Code:claude-opus-5-5
---------
Co-authored-by: bircni <bircni@icloud.com >
Co-authored-by: silverwind <me@silverwind.io >
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2026-11-13 17:32:29 +00:00
Lunny Xiao
61b1a39efe
chore: Move import path from code.gitea.io/gitea to gitea.dev ( #37873 )
2026-05-26 15:49:31 -07:00
TheFox0x7 and wxiaoguang
ee3c82f874
Enable addtional linters ( #34085 )
...
enable mirror, usestdlibbars and perfsprint
part of: https://github.com/go-gitea/gitea/issues/34083
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com >
2025-04-01 10:14:01 +00:00
Lunny Xiao
cddf245c12
Replace more db.DefaultContext ( #27628 )
...
Target #27065
2023-10-15 17:46:06 +02:00
e81ccc406b
Implement FSFE REUSE for golang files ( #21840 )
...
Change all license headers to comply with REUSE specification.
Fix #16132
Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com >
2022-11-27 18:20:29 +00:00
Lunny Xiao
f860a6d2e4
Add system setting table with cache and also add cache supports for user setting ( #18058 )
2022-10-17 07:29:26 +08:00
6543
54e9ee37a7
format with gofumpt ( #18184 )
...
* gofumpt -w -l .
* gofumpt -w -l -extra .
* Add linter
* manual fix
* change make fmt
2022-01-20 18:46:10 +01:00
luzpaz and Lunny Xiao
8c647bf0f6
Fix various typos ( #18219 )
...
Found via `codespell -q 3 -S ./options/locale,./vendor -L ba,pullrequest,pullrequests,readby,te,unknwon`
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-01-10 17:32:37 +08:00
Gusted and Lunny Xiao
242dddfcb7
Remove ioutil ( #18222 )
...
- Don't use `ioutil` package anymore as it doesn't anything special
anymore since Go 1.16:
```
// As of Go 1.16, the same functionality is now provided
// by package io or package os, and those implementations
// should be preferred in new code.
```
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com >
2022-01-10 09:48:13 +08:00
Gusted
dab28c7049
Use JSON module instead of stdlib json ( #18003 )
2021-12-17 09:15:02 +08:00
wxiaoguang
960c322586
Refactor update checker to use AppState ( #17387 )
...
We have the `AppState` module now, it can store app related data easily. We do not need to create separate tables for each feature.
So the update checker can use `AppState` instead of a one-row dedicate table.
And the code of update checker is moved from `models` to `modules`.
2021-10-21 17:10:49 +01:00