Lunny Xiao
eabbddcd98
Restrict permission check on repositories and fix some problems ( #5314 )
* fix units permission problems
* fix some bugs and merge LoadUnits to repoAssignment
* refactor permission struct and add some copyright heads
* remove unused codes
* fix routes units check
* improve permission check
* add unit tests for permission
* fix typo
* fix tests
* fix some routes
* fix api permission check
* improve permission check
* fix some permission check
* fix tests
* fix tests
* improve some permission check
* fix some permission check
* refactor AccessLevel
* fix bug
* fix tests
* fix tests
* fix tests
* fix AccessLevel
* rename CanAccess
* fix tests
* fix comment
* fix bug
* add missing unit for test repos
* fix bug
* rename some functions
* fix routes check
6 years ago
Antoine GIRARD
617a2433a3
Make gitea serv use api/internal ( #4886 )
* Start to move to internal/private
* Add GetPublicKeyByID
* Add HasDeployKey
* Add private.UpdateDeployKeyUpdated
* Add private.GetUserByKeyID
* Add private.AccessLevel
* Add private.CheckUnitUser
* Fix mistakes I made
* Some cleaning + moving code to separate files
* Fix error handling
* Remove useless error handling for setup
* lint: fix comment on exported func
* fix copyright header
* Fix order of args
6 years ago
Julien Tant
dea3d849e1
Give user a link to create PR after push ( #4716 )
* Give user a link to create PR after push
* Forks now create PR in the base repository + make sure PR creation is allowed
* fix code style
6 years ago
Lunny Xiao
1739e84ac0
improve protected branch to add whitelist support ( #2451 )
* improve protected branch to add whitelist support
* fix lint
* fix style check
* fix tests
* fix description on UI and import
* fix test
* bug fixed
* fix tests and languages
* move isSliceInt64Eq to util pkg; improve function names & typo
7 years ago
Lauris BH
fa8d40faca
Fix internal requests when gitea listens to unix socket or only external IP ( #2234 )
* Fix internal requests when gitea listens to unix socket or only external IP
* When Gitea is set to listen using FastCGI use AppURL for LocalURL
7 years ago
Lunny Xiao
1773e88643
Drop db operations from hook commands ( #1514 )
* move all database operations from hook command to web command and instead of internal routes
* bug fixed
* adjust the import path sequences
* remove unused return value on hookSetup
7 years ago
Lunny Xiao
2eeae84cbd
Add internal routes for ssh hook comands ( #1471 )
* add internal routes for ssh hook comands
* fix lint
* add comment on why package named private not internal but the route name is internal
* add comment above package private why package named private not internal but the route name is internal
* remove exp time on internal access
* move routes from /internal to /api/internal
* add comment and defer on UpdatePublicKeyUpdated
7 years ago