summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/admin
Commit message (Collapse)AuthorAgeFilesLines
* Various fixes in login sources (#10428)guillep2k2020-02-232-0/+2
|
* Prevent DeleteUser API abuse (#10125)65432020-02-031-0/+6
| | | | | | * fix & co * word suggestions from @jolheiser
* Minor typo fix (#10043)Andy Harrison2020-01-281-1/+1
|
* API add/generalize pagination (#9452)SpaWn2KiLl2020-01-242-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * paginate results * fixed deadlock * prevented breaking change * updated swagger * go fmt * fixed find topic * go mod tidy * go mod vendor with go1.13.5 * fixed repo find topics * fixed unit test * added Limit method to Engine struct; use engine variable when provided; fixed gitignore * use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors * set Page value on Home route * improved memory allocations * fixed response headers * removed logfiles * fixed import order * import order * improved swagger * added function to get models.ListOptions from context * removed pagesize diff on unit test * fixed imports * removed unnecessary struct field * fixed go fmt * scoped PR * code improvements * code improvements * go mod tidy * fixed import order * fixed commit statuses session * fixed files headers * fixed headers; added pagination for notifications * go mod tidy * go fmt * removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list * Apply suggestions from code review Co-Authored-By: 6543 <6543@obermui.de> Co-Authored-By: zeripath <art27@cantab.net> * fixed build error * CI.restart() * fixed merge conflicts resolve * fixed conflicts resolve * improved FindTrackedTimesOptions.ToOptions() method * added backwards compatibility on ListReleases request; fixed issue tracked time ToSession * fixed build error; fixed swagger template * fixed swagger template * fixed ListReleases backwards compatibility * added page to user search route Co-authored-by: techknowlogick <matti@mdranta.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
* [API] add GET /orgs endpoint (#9560)65432020-01-121-1/+1
| | | | | | | | | | | | | | * introduce `GET /orgs` * add TEST * show also other VisibleType's * update description * refactor a lot * SearchUserOptions by default return only public
* [API] Add notification endpoint (#9488)65432020-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | * [API] Add notification endpoints * add func GetNotifications(opts FindNotificationOptions) * add func (n *Notification) APIFormat() * add func (nl NotificationList) APIFormat() * add func (n *Notification) APIURL() * add func (nl NotificationList) APIFormat() * add LoadAttributes functions (loadRepo, loadIssue, loadComment, loadUser) * add func (c *Comment) APIURL() * add func (issue *Issue) GetLastComment() * add endpoint GET /notifications * add endpoint PUT /notifications * add endpoint GET /repos/{owner}/{repo}/notifications * add endpoint PUT /repos/{owner}/{repo}/notifications * add endpoint GET /notifications/threads/{id} * add endpoint PATCH /notifications/threads/{id} * Add TEST * code format * code format
* Swagger info corrections (#9441)65432019-12-203-24/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 :+1: * use ctx.InternalServerError * Revert "use numbers and not http.Status___ enum" This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef. * use http.Status* enum everywhere
* Move code.gitea.io/gitea/routers/api/v1/convert to ↵Lunny Xiao2019-11-102-2/+2
| | | | | | | | code.gitea.io/gitea/modules/convert (#8892) * Move code.gitea.io/gitea/routers/api/v1/convert to code.gitea.io/gitea/modules/convert * fix fmt
* Password Complexity Checks (#6230)Maxim Tkachenko2019-10-141-1/+13
| | | | | | | | | Add password complexity checks. The default settings require a lowercase, uppercase, number and a special character within passwords. Co-Authored-By: T-M-A <maxim.tkachenko@gmail.com> Co-Authored-By: Lanre Adelowo <adelowomailbox@gmail.com> Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-Authored-By: Lauris BH <lauris@nix.lv>
* Move all mail related codes from models to services/mailer (#7200)Lunny Xiao2019-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move all mail related codes from models to modules/mailer * fix lint * use DBContext instead Engine * use WithContext not WithEngine * Use DBContext instead of Engine * don't use defer when sess.Close() * move DBContext to context.go and add some methods * move mailer from modules/ to services * fix lint * fix tests * fix fmt * add gitea copyright * fix tests * don't expose db functions * make code clear * add DefaultDBContext * fix build * fix bug
* Use gitea forked macaron (#7933)Tamal Saha2019-08-232-4/+2
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* add pagination for admin api get orgs and fix only list public orgs bug (#7742)Lunny Xiao2019-08-041-1/+12
|
* fix wrong email when use gitea as OAuth2 provider (#7640)renothing2019-07-271-4/+3
| | | | | | | when you use gitea as OAuth2 provider, the /api/v1/user should return user primary email as identifier, which is unique in OAuth2 clients. this patch use convert.ToUser replace all u.APIFormat in api requests, return primary email when caller is yourself or admin.
* Fixes #7023 - API Org Visibility (#7028)Richard Mahn2019-05-301-0/+7
|
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-113-3/+3
| | | | | | | | | | | | * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* Fixes #6881 - API users search fix (#6882)Richard Mahn2019-05-081-1/+1
|
* Return a UserList from /api/v1/admin/users (#6629)zeripath2019-04-151-2/+9
|
* Updates to API 404 responses (#6077)John Olheiser2019-03-181-1/+1
|
* Adds MustChangePassword to user create/edit API, defaults to true (#6193)John Olheiser2019-02-271-6/+14
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* New API routes added (#5594)Shashvat Kedia2019-01-232-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New API routes added * Comments added * Build fix * swagger_v1_json.tmpl without new line character * Typo fix * Code review changes * Code review changes * Add copyright * Add copyright * Add copyright * Update per @lafriks feedback * Update org.go * Update user.go * Update user.go * make fmt
* Fix Swagger JSON autogeneration issues. (#4845)zeripath2018-10-203-0/+13
| | | | | | | | | | | | | | | | | | | | | * 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
* API /admin/users/{username} missing parameter (#4775)EnricoFerro2018-08-231-0/+6
|
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-2/+1
|
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-1/+1
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Delete a user's public key via admin api (closes #3014) (#3059)Vlad Temian2017-12-061-0/+45
| | | | | | | | | | | | | | | | * Delete a user's public key via admin api * Test admin ssh endpoint for creating a new ssh key * Adapt public ssh key test to also test the delete operation * Test that deleting a missing key will result in a 404 * Test that a normal user can't delete another user's ssh key * Make DeletePublicKey return err * Update swagger doc
* Update swagger documentation (#2899)Ethan Koenig2017-11-133-84/+123
| | | | | | | | | | | * Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
* Improve swagger doc (#2274)Antoine GIRARD2017-08-213-6/+81
| | | | | | | | | | | | | | | | | | | | * 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
* Use handlers for API authorization (#723)Ethan Koenig2017-01-261-52/+0
|
* Fix permission bugs in team API (#647)Ethan Koenig2017-01-201-88/+0
|
* API endpoints for organization teams (#370)Ethan Koenig2016-12-281-0/+25
|
* Fix random string generator (#384)Denis Denisov2016-12-201-1/+5
| | | | | | | | | | | * Remove unused custom-alphabet feature of random string generator Fix random string generator Random string generator should return error if it fails to read random data via crypto/rand * Fixes variable (un)initialization mixed assign Update test GetRandomString
* golint fixed for routers (#208)Lunny Xiao2016-11-245-5/+17
|
* Fix import path of go-sdk (#141)Sandro Santilli2016-11-114-4/+4
| | | | From code.gitea.io/go-sdk/gitea To code.gitea.io/sdk/gitea
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-105-22/+22
| | | | | | | - 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
* And othersSandro Santilli2016-11-071-1/+1
|
* More...Sandro Santilli2016-11-071-1/+1
|
* Replaced go-gogs-client with go-sdk importsThomas Boerger2016-11-074-4/+4
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-035-18/+18
|
* #3515 use alert instead 500 for duplicated login source nameUnknwon2016-08-311-1/+1
|
* Replace convert.To with APIFormat callsUnknwon2016-08-141-3/+2
|
* Add MaxRepoCreation to EditUser API (#2781)Robin Lambertz2016-08-111-0/+3
|
* Added Full Name to CreateUser api call (#3333)Richard Mahn2016-07-271-0/+1
|
* Refactor User.Id to User.IDUnknwon2016-07-242-4/+4
|
* #2854 fix no mail notification when issue is closed/reopenedUnknwon2016-07-161-3/+2
|
* api/admin: add/remove organization team repositoryUnknwon2016-04-041-0/+49
|
* #1692 add admin APIs to add/remove a user from teamsUnknwon2016-03-251-6/+28
|
* Fix status codeUnknwon2016-03-211-1/+1
|
* Change list teams API to non-admin specificUnknwon2016-03-212-20/+2
|
* #1692 api: admin list and create team under organizationUnknwon2016-03-214-0/+56
|
* #1692 add CRUD issue APIsUnknwon2016-03-132-3/+3
| | | | | - Fix go-gogs-client#10 - Related to #809