Commit graph

18 commits

Author SHA1 Message Date
zeripath
07802a2bc5 Refactor repo.isBare to repo.isEmpty ()
* Refactor repo.isBare to repo.isEmpty 

Signed-off-by: Andrew Thornton <art27@cantab.net>

* Remove Sync call
2019-01-17 19:01:04 -05:00
Lunny Xiao
eabbddcd98
Restrict permission check on repositories and fix some problems ()
* 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
2018-11-28 19:26:14 +08:00
Antoine GIRARD
908e8942cc Fix swagger errors ()
Fix all the resting errors to have a valid swagger file.

They are still some warnings but nothing blocking.

Doing so I found that some request still misses son parameters for some POST/PUT/PATCH request. This means the a client generated from the swagger file will not work completely. 

Fix  by activating validation in drone
Should fix .
2018-06-12 22:59:22 +08:00
stevegt
39f2aa7c12 add simple descriptions for file API responses ()
* Partial fix for 

Swagger needs a description field in each swagger:operation response.  Adding
minimal text for now on the way to getting swagger validate to pass.  Many
standard swagger client libraries will not work with gitea until validate
passes, so prioritizing that over better descriptions for now.

Signed-off-by: Steve Traugott <stevegt@t7a.org>
2018-06-01 13:51:49 +08:00
Bo-Yi Wu
1c5cbc390b refactor: import order. () 2018-03-29 21:32:40 +08:00
Ethan Koenig
f26f4a7e01 Update swagger documentation ()
* Update swagger documentation

Add docs for missing endpoints
Add documentation for request parameters
Make parameter naming consistent
Fix response documentation

* Restore delete comments
2017-11-13 09:02:25 +02:00
Dennis Keitzel
96b4780727 Gracefully handle bare repositories on API operations. ()
Signed-off-by: Dennis Keitzel <github@pinshot.net>
2017-06-10 21:57:28 -05:00
Lunny Xiao
3917ed45de golint fixed for routers () 2016-11-24 15:04:31 +08:00
Sandro Santilli
4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
2016-11-10 17:24:48 +01:00
Sandro Santilli
6e4252dad4 Replace gogits/git-module dependency with go-gitea/git ()
* Replace gogits/git-module dependency with go-gitea/git

Fixes 

* Remove git alias for git module import (not needed)
2016-11-06 11:18:34 -02:00
Rémy Boulanouar
2d68bd1ef9 Change import reference to match gitea instead of gogs () 2016-11-03 10:29:56 -02:00
Andrey Nering
9ac46fb983 Support Editorconfig on web editor 2016-08-30 20:30:47 -03:00
Unknwon
f8a48ffaad Web editor: improve code quality 2016-08-24 21:35:03 -07:00
Unknwon
dd6faf7f9b Convert all API handers to use *context.APIContext 2016-03-13 18:49:16 -04:00
Unknwon
514382e2eb Rename module: middleware -> context 2016-03-11 11:56:52 -05:00
Unknwon
19423957b1 rename import path 2015-12-15 17:25:45 -05:00
Unknwon
9a2e43bff2 move out git module and send push hook 2015-12-09 20:46:05 -05:00
Unknwon
56dd430a10 refactor API routes and some work for 2015-12-04 17:16:42 -05:00
Renamed from routers/api/v1/repo_file.go (Browse further)