Lunny Xiao
86c85c19b6
Refactor AssertExistsAndLoadBean to use generics ( #20797 )
...
* Refactor AssertExistsAndLoadBean to use generics
* Fix tests
Co-authored-by: zeripath <art27@cantab.net>
2 years ago
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
3 years ago
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>
3 years ago
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
3 years ago
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
3 years ago
wxiaoguang
81926d61db
Decouple unit test, remove intermediate `unittestbridge` package ( #17662 )
...
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
3 years ago
wxiaoguang
df64fa4865
Decouple unit test code from business code ( #17623 )
3 years ago
Lunny Xiao
a4bfef265d
Move db related basic functions to models/db ( #17075 )
...
* Move db related basic functions to models/db
* Fix lint
* Fix lint
* Fix test
* Fix lint
* Fix lint
* revert unnecessary change
* Fix test
* Fix wrong replace string
* Use *Context
* Correct committer spelling and fix wrong replaced words
Co-authored-by: zeripath <art27@cantab.net>
3 years ago
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 years ago
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
4 years ago
6543
13bc82009c
API endpoint for repo transfer ( #9947 )
...
* squash
* optimize
* fail before make any changes
* fix-header
5 years ago
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
5 years ago