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
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
8 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
8 years ago