aboutsummaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* Refactor notification for indexer (#5111)Lunny Xiao2019-01-172-0/+10
| | | | | | * notification for indexer * use NullNotifier as parent struct
* api: Add missing GET teams endpoints (#5382)Harshit Bansal2019-01-162-0/+68
| | | | | | | | | | | | | | | | | | | | * 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.
* Add Default Pull Request Title (#5735)Elijah Oyekunle2019-01-161-2/+17
| | | | | | | | * add default PR title Set default PR title to commit summary if there's a single commit on the head branch, else set it to the head branch name * set default PR description If there's a single commit on the head branch, and it's multiline, then set it as the default PR description
* Add proper CORS preflight origin validation (#5740)silverwind2019-01-151-2/+14
|
* Support CORS headers to git smart http protocol (#5719)Lunny Xiao2019-01-141-0/+12
|
* Prioritize "readme.md" (#5691)Khaled Hamed2019-01-141-5/+18
| | | | | | | | * prioritize readme.md * Improve IsReadmeFile * Add more tests
* Do not display the raw OpenID error in the UI (#5705)zeripath2019-01-121-1/+2
| | | | | | | | | | | | | | | | | * Do not display the raw OpenID error in the UI If there are no `WHITELIST_URIS` or `BLACKLIST_URIS` set in the openid section of the app.ini, it is possible that gitea can leak sensitive information about the local network through the error provided by the UI. This PR hides the error information and logs it. Fix #4973 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update auth_openid.go Place error log within the `err != nil` branch.
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-092-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | * add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
* Added URL mapping for Release attachments like on github.com (#1707)gdeverlant2019-01-062-0/+35
|
* fix commit page showing status for current default branch (#5650)Julian2019-01-061-1/+1
| | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* SECURITY: protect DeleteFilePost et al with cleanUploadFileName (#5631)zeripath2019-01-041-2/+18
| | | | | This commit wraps more of the TreePaths with cleanUploadFileName Signed-off-by: Andrew Thornton <art27@cantab.net>
* branch: Trigger update when deleting branch via UI. (#5617)Harshit Bansal2019-01-021-1/+13
| | | Fixes: #5309.
* Issue is not overdue when it is on the same date #5566 (#5568)Rodrigo Villablanca Vásquez2019-01-012-5/+11
| | | | | | | | | | * Due date time of issues and milestones is set to 23:59:59 * Add docs * make gen swagger * fix swagger gen
* Delete organization endpoint added (#5601)Shashvat Kedia2018-12-272-1/+25
| | | | | | | | | | * Delete organization endpoint added * Parameters added in comment * Typo fix * Newline character removed
* Add rebase with merge commit merge style (#3844) (#4052)Julian2018-12-273-0/+6
| | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* Fix route in swagger (#5598)Shashvat Kedia2018-12-261-1/+1
|
* fix bug on upload file name (#5571)Lunny Xiao2018-12-202-1/+48
|
* fix lfs version check warning log when using ssh protocol (#5501)Lunny Xiao2018-12-191-0/+1
|
* Support reverse proxy providing email (#5554)zeripath2018-12-181-0/+1
| | | This PR implements #2347
* Improve performance of dashboard (#4977)Lunny Xiao2018-12-136-29/+62
|
* fix approvals limitation (#5521)Lunny Xiao2018-12-111-2/+4
|
* fix permission check on api create org (#5523)Lunny Xiao2018-12-111-1/+1
|
* fix clone wiki failed via ssh (#5503)Lunny Xiao2018-12-112-0/+35
|
* fix adding reaction fail for read permission (#5515)Lunny Xiao2018-12-111-2/+2
|
* Approvals at Branch Protection (#5350)Jonas Franz2018-12-112-3/+31
| | | | | | | | | | | | | | | | | | | | | | * Add branch protection for approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add required approvals Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add missing comments and fmt Signed-off-by: Jonas Franz <info@jonasfranz.software> * Add type = approval and group by reviewer_id to review * Prevent users from adding negative review limits * Add migration for approval whitelists Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix empty wiki (#5504)Lunny Xiao2018-12-091-1/+3
| | | | | | * fix wiki page when wiki path is exist but empty * improve the error check
* Improve team members and repositories settings UI (#5457)Lunny Xiao2018-12-091-0/+2
| | | | | | | | | | | | * improve team members and repositories settings UI * use tab on team pages * add default description on team members and repos * add blank on numbers and texts * improve translation
* add tests for api user orgs (#5494)Lunny Xiao2018-12-091-1/+1
| | | | | | * add tests for api user orgs * add permission for admin to list user's orgs even he is a private user of org
* admin should be able to delete repos even if he is not a member of the ↵Lanre Adelowo2018-12-021-1/+1
| | | | organization (#5443)
* Removing Labels via EditPullRequest API (#5348)Lucien Kerl2018-12-011-1/+1
| | | | | | | | * added the ability to provide an empty array at the EditPullRequests API to remove all labels Signed-off-by: Lucien Kerl <lucien.kerl@wuerth-it.com> * Update pull.go
* Allow to add organization members as collaborators on organization owned ↵Lanre Adelowo2018-11-301-13/+0
| | | | | repositories (#4748) repository... Fixes #4507
* Milestone issues and pull requests (#5293)Lunny Xiao2018-11-293-257/+316
| | | | | | | | | | | | * add milestone issues and pulls page instead of redirecting issues page * add milestone when creating issue from milestone page * refactor to merge similiar codes as a new function issues * remove milestone info on milestone issues list * fix missing params
* Git-Trees API (#5403)Kasi Reddy2018-11-282-0/+93
| | | | | | | | | | | | * Git-Trees API * update vendor'd libs * added comments to exported function and formatted. * make fmt * update per @lafirks feedback
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-2827-364/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Implement git refs API for listing references (branches, tags and other) (#5354)Lauris BH2018-11-273-0/+133
| | | | | | | | | | | | | | | | * Inital routes to git refs api * Git refs API implementation * Update swagger * Fix copyright * Make swagger happy add basic test * Fix test * Fix test again :)
* Create Progressive Web App (#4730)SohnyBohny2018-11-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | * Create manifest and serviceworker * Create templates and add AppSubUrl * Add JSRenderer * fix ctx type * Add JSRenderer to static.go * Complete adding {{AppSubUrl}} * Add more fonts to urlsToCache * Add 512px and 192px icons * Hardcode font MD5 * Default theme doesn't have a specific CSS file
* show only opened milestones on issues page milestone filter (#5051)Lanre Adelowo2018-11-261-2/+2
| | | | | | | | | | | | | | * show only opened milestones on issues page milestone filter * update Godoc * update Godoc everywhere * update swagger * use false instead of 0 * Add seccond ordering by ID for milestones where no deadline is set
* 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>
* Show review summary in pull requests (#5132)kolaente2018-11-221-0/+6
|
* add api for user to create org (#5268)Lunny Xiao2018-11-202-0/+53
| | | | | | | | | | | | | | | | * 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
* Add raw blob endpoint to get objects by SHA ID (#5334)Peter Hoffmann2018-11-182-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add raw blob endpoint This should make it possible to download raw blobs directly from /:repo/:username/raw/blob/:sha1 URLs. * fix: Make it work * As an SHA-ID is no path getRefNameFromPath can't be used to verify file specifying parameter * added relevant change in go-gitea/git #132 Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * Update Gopkg.lock Can't update all vendors due to errors Signed-off-by: Berengar W. Lehr <Berengar.Lehr@kompetenztest.de> * style: Add Gitea copyright header * feat: Added integration test for /repo/u/r/raw/blob * fix: correct year in copyright header
* added the ability to set labels on the "edit pull request" api (#5347)Lucien Kerl2018-11-161-0/+12
| | | Signed-off-by: Lucien Kerl <lucien.kerl@wuerth-it.com>
* Block registration based on email domain (#5157)Lanre Adelowo2018-11-141-0/+5
| | | * implement email domain whitelist
* Fix create team, update team missing units (#5188)Lunny Xiao2018-11-102-0/+28
|
* Add option to disable automatic mirror syncing. (#5242)Jonas Bröms2018-11-081-2/+6
| | | Setting the interval to 0 will disable to automatic syncing.
* Prometheus endpoint (#5256)Stanislav2018-11-042-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add prometheus collector and route * dep ensure -add github.com/prometheus/client_golang/prometheus * dep ensure -update github.com/golang/protobuf * add metrics to reserved usernames * add comment head in metrics package * fix style imports * add metrics settings * add bearer token check * mapping metrics configs * fix lint * update config cheat sheet * update conf sample, typo fix
* Fix #5226 by adding CSRF checking to api reqToken and add CSRF to the POST ↵zeripath2018-11-031-4/+8
| | | | | | | | | | header for deadline (#5250) * Add CSRF checking to reqToken and place CSRF in the post for deadline creation Fixes #5226, #5249 * /api/v1/admin/users routes should have reqToken middleware
* Keys API changes (#4960)zeripath2018-10-313-14/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Add AutoHead functionality. (#5186)zeripath2018-10-301-0/+1
| | | Fixes #5153
* Make gitea serv use api/internal (#4886)Antoine GIRARD2018-10-302-5/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Start to move to internal/private * Add GetPublicKeyByID * Add HasDeployKey * Add private.UpdateDeployKeyUpdated * Add private.GetUserByKeyID * Add private.AccessLevel * Add private.CheckUnitUser * Fix mistakes I made * Some cleaning + moving code to separate files * Fix error handling * Remove useless error handling for setup * lint: fix comment on exported func * fix copyright header * Fix order of args