Commit Graph

40 Commits (e0172f0db76499eeafcf29a77b9457e75b5b8952)

Author SHA1 Message Date
Lanre Adelowo 5c82ef098e make sure units of a team are returned ()
John Olheiser cac9e6e760 Updates to API 404 responses ()
Rémy Boulanouar 64ce159a6e Allow to set organization visibility (public, internal, private) ()
Harshit Bansal 5ac6da3c41 api: Add missing GET teams endpoints ()
* api: Add an endpoint to list a particular member of team.

* models: Rename `GetUserTeams()` to `GetUserOrgTeams()` in `org_team` model.

`GetUserTeams()` sounds a bit misnomer since it actually returns
the teams that user belongs to in a given organization rather than
all the teams across all the organization that the user has joined.

* models: Add `GetUserTeams()`.

Returns all the teams that a user belongs to.

* api: Add an endpoint for GET '/user/teams'.

A GET request to this endpoint lists all the teams that a user
belongs to.
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 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
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
Lunny Xiao b3000ae623 Fix create team, update team missing units ()
zeripath 43f9233914 Fix Swagger JSON autogeneration issues. ()
* Fix Swagger JSON.

Remove unnecessary schema references for the forbidden and empty responses

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

* Fix swagger API for CreateAccessToken

* Fix admin create org swagger

* Fix swagger for adminCreateRepo

* More swagger fixes

Set int64 format for those which are int64
Some more form fixes

* Fix swagger description of GET /repos/{owner}/{repo}/pulls
Nicolas Da Mutten e07d3ad0fc Fixes repo membership check in API ()
Untested, since I can't compile (yet).
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 .
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>
Morgan Bazalgette e3028d124f don't reset team/repo count when updating team via API ()
fixes 
Ethan Koenig 515cdaa85d Fix ignored errors when checking if organization, team member ()
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
Antoine GIRARD fd8e8a421a Improve swagger doc ()
* Add swagger comment for adminCreateOrg

* Add swagger comment for admin route

* add hook swagger doc

* Add tags

* Add auth

* Fix name of responses

* Edit name method

* Update vendor

* make generate-swagger
Lunny Xiao f960e19c59 Only update needed columns when update user ()
* only update needed columns when update user

* fix missing update_unix column
Ethan Koenig f38842320e Bug fixes for org member API
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment ()
Ethan Koenig d1b5498cc0 Use handlers for API authorization ()
Ethan Koenig 74bbec3bf9 Fix permission bugs in team API ()
Ethan Koenig fcf02e4961 API Endpoints for organization members ()
Ethan Koenig 27fcf8d30a Bug fixes for webhook API ()
Ethan Koenig f686a32eac API endpoints for organization teams ()
Ethan Koenig 9847b38518 Organization webhook API endpoints
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 90e93b1f3a Change list teams API to non-admin specific
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