summaryrefslogtreecommitdiffstats
path: root/routers/api/v1/user
Commit message (Collapse)AuthorAgeFilesLines
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* Admins can now do unlimited page size user search (listAllUsers & ↵John Olheiser2019-02-211-1/+1
| | | | | listAllOrgs) (#6143) Non-admins will default to 10 page size
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-283-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* API: '/orgs/:org/repos': return private repos with read access (#5310) ↵Daniel Balko2018-11-231-7/+9
| | | | | (#3829) (#5383) Signed-off-by: Daniel Balko <inxonic+github@gmail.com>
* Keys API changes (#4960)zeripath2018-10-311-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add private information to the deploy keys api This commit adds more information to the deploy keys to allow for back reference in to the main keys list. It also adds information about the repository that the key is referring to. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add private information to the user keys API This adjusts the keys API to give out private information to user keys if the current user is the owner or an admin. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add ability to search keys by fingerprint This commit adds the functionality to search ssh-keys by fingerprint of the ssh-key. Deploy keys per repository can also be searched. There is no current clear API point to allow search of all deploy keys by fingerprint or keyID. Signed-off-by: Andrew Thornton <art27@cantab.net> * Add integration test
* User action heatmap (#5131)kolaente2018-10-231-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added basic heatmap data * Added extra case for sqlite * Built basic heatmap into user profile * Get contribution data from api & styling * Fixed lint & added extra group by statements for all database types * generated swagger spec * generated swagger spec * generated swagger spec * fixed swagger spec * fmt * Added tests * Added setting to enable/disable user heatmap * Added locale for loading text * Removed UseTiDB * Updated librejs & moment.js * Fixed import order * Fixed heatmap in postgresql * Update docs/content/doc/advanced/config-cheat-sheet.en-us.md Co-Authored-By: kolaente <konrad@kola-entertainments.de> * Added copyright header * Fixed a bug to show the heatmap for the actual user instead of the currently logged in * Added integration test for heatmaps * Added a heatmap on the dashboard * Fixed timestamp parsing * Hide heatmap on mobile * optimized postgresql group by query * Improved sqlite group by statement
* Fix Swagger JSON autogeneration issues. (#4845)zeripath2018-10-204-0/+15
| | | | | | | | | | | | | | | | | | | | | * 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
* Add support for search by uid (#4876)zeripath2018-10-181-0/+5
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Update Swagger API to match the return of /users/search (#4847)zeripath2018-09-211-1/+10
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Respect email privacy option in user search via API (#4512)Lanre Adelowo2018-07-251-1/+1
| | | | | | * respect user's email privacy option * make email visible to admin irrespective of privacy option
* Add ability to delete a token (#4235)techknowlogick2018-07-061-0/+37
| | | Fix #4234
* Fix swagger errors (#4220)Antoine GIRARD2018-06-122-2/+14
| | | | | | | | | | 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 #4088 by activating validation in drone Should fix #4010.
* swagger: add 'required: true' for params in URL (#4097)stevegt2018-06-021-0/+1
| | | | | | | | * Partial fix for #4010 Swagger validation needs 'required: true' for parameters that are in the URL path. Signed-off-by: Steve Traugott <stevegt@t7a.org>
* LDAP Public SSH Keys synchronization (#1844)Magnus Lindvall2018-05-241-1/+1
| | | | | | | | | | | | | | | | | | | * Add LDAP Key Synchronization feature Signed-off-by: Magnus Lindvall <magnus@dnmgns.com> * Add migration: add login source id column for public_key table * Only update keys if needed * Add function to only list pubkey synchronized from ldap * Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it. * Only get keys belonging to current login source id * Set default login source id to 0 * Some minor cleanup. Add integration tests (updete dep testify)
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-111-2/+2
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Delete a user's public key via admin api (closes #3014) (#3059)Vlad Temian2017-12-061-1/+5
| | | | | | | | | | | | | | | | * 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-139-333/+547
| | | | | | | | | | | * Update swagger documentation Add docs for missing endpoints Add documentation for request parameters Make parameter naming consistent Fix response documentation * Restore delete comments
* fix importsLunny Xiao2017-10-251-5/+4
|
* some fixesLunny Xiao2017-10-251-1/+2
|
* Hide unactive on explore users and some refactors (#2741)Lunny Xiao2017-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * hide unactive on explore users and some refactors * fix test for removed Organizations * fix test for removed Organizations * fix imports * fix logic bug * refactor the toConds * Rename TestOrganizations to TestSearchUsers and add tests for users * fix other tests * fix other tests * fix watchers tests * fix comments and remove unused code
* Improve swagger doc (#2274)Antoine GIRARD2017-08-218-36/+36
| | | | | | | | | | | | | | | | | | | | * 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
* API: support '/orgs/:org/repos' (#2047)Aaron Walker2017-07-131-0/+18
| | | * API: support '/orgs/:org/repos'
* Fix GET /users/:username/repos endpoint (#2125)Ethan Koenig2017-07-101-30/+30
|
* feat: add check misspelling (#1877)Bo-Yi Wu2017-06-051-1/+1
|
* Generate swagger json (#1402)Antoine GIRARD2017-05-028-14/+300
| | | | | | | - Generate swagger.json into public/ - Add swagger-ui auto-installation - Add footer link to local swagger-ui - Add /swagger url for using app url. - Fix Swagger-UI version via git tag
* bug fixed for API to get user's repos (#1622)Lunny Xiao2017-04-291-4/+7
| | | | | | | | * bug fixed for API to get user's repos * add tests and fix another place * test user2 since user1 has no repos
* Migrate WatchInfo struct to api (#1492)Antoine GIRARD2017-04-161-14/+2
| | | | | | | | * Remove WatchInfo and link to api struct * Add vendor temporary update * Return to gitea vendor source
* Implement GPG api (#710)Antoine GIRARD2017-03-161-0/+102
| | | | | | | | | | * Implement GPG API * Better handle error * Apply review recommendation + simplify database operations * Remove useless comments
* Refactor and fix incorrect comment (#1247)Ethan Koenig2017-03-152-10/+3
|
* fix panic when get user repos from api (#1110)Lunny Xiao2017-03-031-2/+2
|
* API: support /users/:username/reposawwalker2017-02-271-0/+62
| | | | | | | | | | clean up fix arguments remove repeated token give admins listing rights
* Fix go vet faults (#1060)Ethan Koenig2017-02-261-2/+8
|
* fix: trim the whitespaces for the search keyword (#893)Bo-Yi Wu2017-02-111-1/+3
|
* API Endpoint for watching (#191)Ethan Koenig2016-12-241-0/+123
|
* fixed vulnerabilities (#392)Lunny Xiao2016-12-151-0/+1
|
* Bug fixes for repo permissions in APIEthan Koenig2016-12-071-1/+9
| | | | Also move duplicated code into repo.APIFormat(..)
* Fix breakage from vendor-updateKim "BKC" Carlbäcker2016-11-291-1/+1
|
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-271-1/+1
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* golint fixed for routers (#208)Lunny Xiao2016-11-245-19/+41
|
* API endpoints for starsEthan Koenig2016-11-161-0/+76
|
* Fix import path of go-sdk (#141)Sandro Santilli2016-11-115-5/+5
| | | | 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-20/+20
| | | | | | | - 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
|
* Replaced go-gogs-client with go-sdk importsThomas Boerger2016-11-075-5/+5
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-035-15/+15
|
* Replace convert.To with APIFormat callsUnknwon2016-08-142-5/+3
|
* Fix #3391Unknwon2016-08-111-3/+6
|
* Refactor User.Id to User.IDUnknwon2016-07-245-13/+13
|
* #1692 api: admin list and create team under organizationUnknwon2016-03-212-0/+0
|
* #1692 add CRUD issue APIsUnknwon2016-03-133-6/+6
| | | | | - Fix go-gogs-client#10 - Related to #809