KN4CK3R
c337ff0ec7
Add user blocking (#29028)
Fixes #17453
This PR adds the abbility to block a user from a personal account or
organization to restrict how the blocked user can interact with the
blocker. The docs explain what's the consequence of blocking a user.
Screenshots:
![grafik](https://github.com/go-gitea/gitea/assets/1666336/4ed884f3-e06a-4862-afd3-3b8aa2488dc6 )
![grafik](https://github.com/go-gitea/gitea/assets/1666336/ae6d4981-f252-4f50-a429-04f0f9f1cdf1 )
![grafik](https://github.com/go-gitea/gitea/assets/1666336/ca153599-5b0f-4b4a-90fe-18bdfd6f0b6b )
---------
Co-authored-by: Lauris BH <lauris@nix.lv>
4 maanden geleden
Lunny Xiao
9bb1adf8ea
Move some repository transfer functions to service layer (#28855)
5 maanden geleden
JakobDev
f91dbbba98
Next round of `db.DefaultContext` refactor (#27089)
Part of #27065
10 maanden geleden
Lunny Xiao
540bf9fa6d
Move notification interface to services layer (#26915)
Extract from #22266
10 maanden geleden
Jason Song
04347eb810
Use context parameter in services/repository (#23186)
Use context parameter in `services/repository`.
And use `cache.WithCacheContext(ctx)` to generate push action history
feeds.
Fix #23160
1 jaar geleden
yp05327
bd66fa586a
Rename `repo.GetOwner` to `repo.LoadOwner` (#22967)
Fixes https://github.com/go-gitea/gitea/issues/22963
---------
Co-authored-by: Yarden Shoham <hrsi88@gmail.com>
1 jaar geleden
Lunny Xiao
68704532c2
Rename almost all Ctx functions (#22071)
1 jaar geleden
Lunny Xiao
0a7d3ff786
refactor some functions to support ctx as first parameter (#21878)
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: Lauris BH <lauris@nix.lv>
1 jaar geleden
flynnnnnnnnnn
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>
1 jaar geleden
KN4CK3R
044c754ea5
Add `context.Context` to more methods (#21546)
This PR adds a context parameter to a bunch of methods. Some helper
`xxxCtx()` methods got replaced with the normal name now.
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
1 jaar geleden
Lunny Xiao
1d8543e7db
Move some files into models' sub packages (#20262)
* Move some files into models' sub packages
* Move functions
* merge main branch
* Fix check
* fix check
* Fix some tests
* Fix lint
* Fix lint
* Revert lint changes
* Fix error comments
* Fix lint
Co-authored-by: 6543 <6543@obermui.de>
1 jaar geleden
Lunny Xiao
cbd45471b1
Move access and repo permission to models/perm/access (#19350)
* Move access and repo permission to models/perm/access
* Remove unnecessary code
2 jaren geleden
6543
f034ee6cf0
PullService lock via pullID (#19520)
* lock pull on git&db actions ...
* add TODO notes
* rename prQueue 2 prPatchCheckerQueue
* fmt
2 jaren geleden
Lunny Xiao
b06b9a056c
Move organization related structs into sub package (#18518)
* Move organization related structs into sub package
* Fix test
* Fix lint
* Move more functions into sub packages
* Fix bug
* Fix test
* Update models/organization/team_repo.go
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Apply suggestions from code review
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix fmt
* Follow suggestion from @Gusted
* Fix test
* Fix test
* Fix bug
* Use ctx but db.DefaultContext on routers
* Fix bug
* Fix bug
* fix bug
* Update models/organization/team_user.go
* Fix bug
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2 jaren geleden
Lunny Xiao
a6d4a8546a
Fix rename notification bug (#18008)
2 jaren geleden
Lunny Xiao
5723240490
Some repository refactors (#17950)
* some repository refactors
* remove unnecessary code
* Fix test
* Remove unnecessary banner
2 jaren geleden
Lunny Xiao
719bddcd76
Move repository model into models/repo (#17933)
* Some refactors related repository model
* Move more methods out of repository
* Move repository into models/repo
* Fix test
* Fix test
* some improvements
* Remove unnecessary function
2 jaren geleden
Lunny Xiao
1fee11d69a
Move accessmode into models/perm (#17828)
2 jaren geleden
Lunny Xiao
a666829a37
Move user related model into models/user (#17781)
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
2 jaren geleden
Nils Dralle
f374789fe2
Fix private repo permission problem (#16142)
* Change user access permission
* Add string 'transfer_notices_3'
* Add 3rd transfer note to transfer dialog
* Add test
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
3 jaren geleden
6543
a4148c0f12
Repository transfer has to be confirmed, if user can not create repo for new owner (#14792)
* make repo as "pending transfer" if on transfer start doer has no right to create repo in new destination
* if new pending transfer ocured, create UI & Mail notifications
3 jaren geleden
6543
a19447aed1
migrate from com.* to alternatives (#14103)
* remove github.com/unknwon/com from models
* dont use "com.ToStr()"
* replace "com.ToStr" with "fmt.Sprint" where its easy to do
* more refactor
* fix test
* just "proxy" Copy func for now
* as per @lunny
3 jaren geleden
6543
13bc82009c
API endpoint for repo transfer (#9947)
* squash
* optimize
* fail before make any changes
* fix-header
4 jaren geleden
Lunny Xiao
d32eac44b1
Move RepoWorkingPool to services/repository package (#9754)
* Move RepoWorkingPool to services/repository package
* Make repoWorkingPool private
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
4 jaren geleden
Lunny Xiao
77730db257
Move repoWorkPool outside rename/transfer repository (#9086)
* Move repoWorkPool outside rename/transfer repository
* fix import
* Fix test
4 jaren geleden
Lunny Xiao
21ae9838e0
Move transfer repository and rename repository on a service package and start action notification (#8573)
* move transfer repository and rename repository on a service package and start action notification
* remove unused codes
* fix lint
* fix bugs
* fix test
* fix test
* fix test
* fix lint
* update go mod and sum
4 jaren geleden