Commit Graph

27 Commits (4f42e03a3504e326b4f61969b796e8548598c49d)

Author SHA1 Message Date
6543 2848c5eb8f Swagger info corrections ()
* use numbers and not http.Status___ enum

* fix test

* add many missing swagger responses

* code format

* Deletion Sould return 204 ...

* error handling improvements

* if special error type ... then add it to swagger too

* one smal nit

* invalidTopicsError is []string

* valid swagger specification 2.0
 - if you add responses swagger can tell you if you do it right 👍

* use ctx.InternalServerError

* Revert "use numbers and not http.Status___ enum"

This reverts commit b1ff386e24.

* use http.Status* enum everywhere
Lunny Xiao daab245167
Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert ()
* Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert

* fix fmt
David Svantesson a0e88dfc2e Add teams to repo on collaboration page. ()
* Add teams to repo on collaboration page.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add option for repository admins to change teams access to repo.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add comment for functions

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make RepoAdminChangeTeamAccess default false in xorm and make it default checked in template instead.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Make proper language strings and fix error redirection.

* Add unit tests for adding and deleting team from repository.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Add database migration

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix redirect

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Fix locale string mismatch.

Signed-off-by: David Svantesson <davidsvantesson@gmail.com>

* Move team access mode text logic to template.

* Move collaborator access mode text logic to template.
Tamal Saha 171b359877 Use gitea forked macaron ()
Signed-off-by: Tamal Saha <tamal@appscode.com>
Richard Mahn 43cf2f3b55 Fixes - API Org Visibility ()
Lunny Xiao 34eee25bd4
Move sdk structs to modules/structs ()
* move sdk structs to moduels/structs

* fix tests

* fix fmt

* fix swagger

* fix vendor
Rémy Boulanouar 64ce159a6e Allow to set organization visibility (public, internal, private) ()
Shashvat Kedia 6e20b504b1 Delete organization endpoint added ()
* Delete organization endpoint added

* Parameters added in comment

* Typo fix

* Newline character removed
Shashvat Kedia ba2c02b75d Fix route in swagger ()
Lunny Xiao 58c4559d3b fix permission check on api create org ()
Lunny Xiao da5a0b8382
add tests for api user orgs ()
* add tests for api user orgs

* add permission for admin to list user's orgs even he is a private user of org
Lunny Xiao 8ef177f8c5 add api for user to create org ()
* add api for user to create org

* remove unused blank line on the swagger file end

* fix create and add test

* fix tests

* fix routes of create org API

* fix bug

* add copyright heads
stevegt a5f63fc4d1 swagger: add 'required: true' for params in URL ()
* Partial fix for 

Swagger validation needs 'required: true' for parameters that are in
the URL path.

Signed-off-by: Steve Traugott <stevegt@t7a.org>
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
Lunny Xiao f960e19c59 Only update needed columns when update user ()
* only update needed columns when update user

* fix missing update_unix column
Ethan Koenig d1b5498cc0 Use handlers for API authorization ()
Lunny Xiao 3917ed45de golint fixed for routers ()
Sandro Santilli a1c5f02444 Fix import path of go-sdk ()
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
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
Thomas Boerger 4c6c16f358
Replaced go-gogs-client with go-sdk imports
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()
Unknwon 1f2e173a74 Refactor User.Id to User.ID
Unknwon b1d41cfa60 add admin APIs to add/remove a user from teams
Unknwon 9bd9ad4205 add CRUD issue APIs
- Fix go-gogs-client#10
- Related to 
Unknwon dd6faf7f9b Convert all API handers to use *context.APIContext
Unknwon 514382e2eb Rename module: middleware -> context
Unknwon 9cd16c5b12 add organization APIs