summaryrefslogtreecommitdiffstats
path: root/routers
Commit message (Collapse)AuthorAgeFilesLines
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-2723-41/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * move code.gitea.io/git to code.gitea.io/gitea/modules/git * fix imports * fix fmt * fix misspell * remove wrong tests data * fix unit tests * fix tests * fix tests * fix tests * fix tests * fix tests * enable Debug to trace the failure tests * fix tests * fix tests * fix tests * fix tests * fix tests * comment commit count tests since git clone depth is 50 * fix tests * update from code.gitea.io/git * revert change to makefile
* Clean up ref name rules (#6437)mrsdizzie2019-03-261-1/+2
| | | | | | | | | | | | | | | | | * Clean up ref name rules Clean up checks on reference names to better conform to the guideline here: https://git-scm.com/docs/git-check-ref-format This fixes half of #6321 * Update branch create integration test According to: https://git-scm.com/docs/git-check-ref-format And: git check-ref-format "master/feature=test1" This is a valid branch name and we should not be testing for it to fail.
* Fix Hook & HookList in Swagger (#6432)Segev Finer2019-03-261-2/+2
| | | Signed-off-by: Segev Finer <segev@codeocean.com>
* routers/repo/setting: display correct error for invalid mirror interval (#6414)Allen Wild2019-03-251-0/+10
| | | | | | | | | | | Set Err_Interval in the context data so that the mirror interval box is highlighted red as expected. Clear Err_RepoName for the mirror and advanced actions. repo_name is not set by these forms, causing auth.validate() to set the Err_RepoName before SettingsPost is called, which would lead to the repository name box getting erroneously highlighted red. Fixes: https://github.com/go-gitea/gitea/issues/6396
* Updates SDK dep (#6406)Richard Mahn2019-03-221-6/+10
|
* Markdown: enable some more extensions (#6362)Roland Koebler2019-03-211-2/+2
| | | | | | | | | | | | | | * Markdown: enable some more extensions Improve Markdown-rendering by enabling some extensions: - enable definitions lists - enable footnotes - enable header-ids and automatically generate header-ids (for linking to README-sections or creating table-of-contents for larger READMEs) * Markdown: update and exted tests Update and add tests for additionally enabled Markdown-extensions.
* Don't Unescape redirect_to cookie value (#6399)mrsdizzie2019-03-202-6/+5
| | | | | | | redirect_to holds a value that we want to redirect back to after login. This value can be a path with intentonally escaped values and we should not unescape it. Fixes #4475
* Include more variables on admin/config page (#6378)mrsdizzie2019-03-191-0/+16
| | | | | | | | | | Include the current CustomPath location in the admin section and also display GITEA_WORK_DIR and/or GITEA_CUSTOM env var if they are set. Right now there is no easy way to see this information, and if you try and help most users they won't be able to tell you anything about these values -- just that their custom template isn't working, files aren't in the right place, etc... Now you can see all paths and if they were set by ENV or not.
* make sure units of a team are returned (#6379)Lanre Adelowo2019-03-191-0/+5
|
* Implement Default Webhooks (#4299)Russell Aunger2019-03-184-21/+104
| | | | | | | | Partially implement #770. Add "Default Webhooks" page in site admin UI. Persist to the existing webhooks table, but store with RepoID=0 and OrgID=0. Upon repo creation, copy the set of default webhooks into the new repo.
* Updates to API 404 responses (#6077)John Olheiser2019-03-1829-91/+91
|
* Add bio field for user (#6113)techknowlogick2019-03-181-0/+1
| | | | Fix #4339
* Clean up various use of escape/unescape functions for URL generation (#6334)mrsdizzie2019-03-183-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use PathUnescape instead of QueryUnescape when working with branch names Currently branch names with a '+' fail in certain situations because QueryUnescape replaces the + character with a blank space. Using PathUnescape should be better since it is defined as: // PathUnescape is identical to QueryUnescape except that it does not // unescape '+' to ' ' (space). Fixes #6333 * Change error to match new function name * Add new util function PathEscapeSegments This function simply runs PathEscape on each segment of a path without touching the forward slash itself. We want to use this instead of PathEscape/QueryEscape in most cases because a forward slash is a valid name for a branch etc... and we don't want that escaped in a URL. Putting this in new file url.go and also moving a couple similar functions into that file as well. * Use EscapePathSegments where appropriate Replace various uses of EscapePath/EscapeQuery with new EscapePathSegments. Also remove uncessary uses of various escape/unescape functions when the text had already been escaped or was not escaped. * Reformat comment to make drone build happy * Remove no longer used url library * Requested code changes
* Add same changes from issues page to milestone->issues page (#6328)John Olheiser2019-03-152-1/+9
|
* Return 409 when creating repo if it already exists. (#6330)Bogdan Petrea2019-03-151-2/+3
|
* update git vendor to fix wrong release commit id and add migrations (#6224)Lunny Xiao2019-03-111-1/+1
| | | | | | | | | | * update git vendor to fix wrong release commit id and add migrations * fix count * fix migration release * fix tests
* Add support for client basic auth for exchanging access tokens (#6293)Jonas Franz2019-03-111-1/+27
| | | | | | | | * Add support for client basic auth for exchanging access tokens * Improve error messages * Fix tests
* Copyedit docs (#6275)Aidan Fitzgerald2019-03-092-2/+2
|
* Add regenerate secret feature for oauth2 (#6291)Jonas Franz2019-03-092-0/+29
| | | | | | * Add regenerate secret functionality * Fix lint
* Add unit types to repo action URL to correctly show 404 when archived (#6247)John Olheiser2019-03-091-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Integrate OAuth2 Provider (#5378)Jonas Franz2019-03-085-1/+587
|
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-031-0/+1
| | | | | update vendor and add tests fix swagger
* fix display dashboard even if require to change password (#6214)Lunny Xiao2019-02-281-0/+6
| | | | | | * fix display dashboard even if require to change password * fix comments
* Create a repo redirect when transferring ownership (#6210) (#6211)James E. Blair2019-02-281-0/+8
| | | | | | | When transferring ownership of a repo to a different user/org, create a repo redirect that points to the new location in the same way that is done when a repo is renamed. Signed-off-by: James E. Blair <jeblair@redhat.com>
* 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>
* fix bug when migrate repository 500 when repo is existed (#6188)Lunny Xiao2019-02-262-0/+10
| | | | | | | | * fix bug when migrate repository 500 when repo is existed * use 409 but not 422 for error status code when not exist * translation fix
* fix bug user could change private repository to public when force private ↵Lunny Xiao2019-02-221-0/+8
| | | | enabled. (#6156)
* fix bug when update owner team then visit team's repo return 404 (#6119)Lunny Xiao2019-02-221-2/+0
|
* Make repo creation for API similar to UI (#6142)John Olheiser2019-02-211-0/+3
|
* Allow display of LFS stored Readme.md on directory page (#6073) (#6099)zeripath2019-02-211-26/+88
| | | | | | | | | | | | | | | | | | * Fix display of >1Kb LFS text files * Make LFS stored Readme files viewable Signed-off-by: Andrew Thornton <art27@cantab.net> * Slight restructure Signed-off-by: Andrew Thornton <art27@cantab.net> * Slight restructure Signed-off-by: Andrew Thornton <art27@cantab.net> * catch errors and restructure LFS sections
* 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
* refactor issue indexer, add some testing and fix a bug (#6131)Lunny Xiao2019-02-213-3/+6
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Minor UI tweaks (#5980)John Olheiser2019-02-192-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove all CommitStatus when a repo is deleted Signed-off-by: jolheiser <john.olheiser@gmail.com> * Minor UI tweaks (#5782) Added 'No License' option Added link and octicon change for external issue trackers Reset password now notifies right away if the code is invalid Signed-off-by: jolheiser <john.olheiser@gmail.com> * More UI tweaks More info in PR * Generate stylesheet for arc-green * Make gofmt work * Change PR integration since the button is changed * Rebase * Generate stylesheet * UI updates Made the PR button a "basic" button Vertically centered the issue checkboxes Labels will update only once after modal is closed * Commit to reference related issues Resolves #5782 Resolves #5861 Addresses original question in #5993 * Change the comment wording since PR button is no longer little and green. * Revert changes that made Windows work * Regenerate stylesheet * Regenerate stylesheets * make generate-stylesheets * Update integration again, changed button style Signed-off-by: jolheiser <john.olheiser@gmail.com> * Added ID to PR button Changed integration to use the ID to avoid breaking in the future * Added missing semi-colons * Added back distinction between issue actions and filters (overlooked it before) Moved action button over next to other action dropdowns * Remove extra tab formatting in list.tmpl * Remove more formatting from GoLand * Replace hardcoded "No License" with i18n license helper.
* Load Issue attributes for API call (#6122)John Olheiser2019-02-191-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Refactor issue indexer (#5363)Lunny Xiao2019-02-193-5/+9
|
* Show email if the authenticated user owns the profile page being requested ↵Lanre Adelowo2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | for (#4981) * Show email if the authenticated user owns the profile page being requested for. Also removed `setting.UI.ShowUserEmail` as it's documentation says it only controls the email setting on the explore page * fix current user check... This prevents a panic as a user must be signed in before ctx.User is called * fix panic in tests * try to fix tests * Update year * Test CI fail * Revert change * User 3 is not allowed to authorize * Set user2 email to be private * Change to user4 in explore page as user2 now has private email option set
* Fix prohibit login check on authorization (#6106)Lunny Xiao2019-02-192-0/+18
| | | | | | | | | | | | * fix bug prohibit login not applied on dashboard * fix tests * fix bug user status leak * fix typo * return after render
* Show private organization for admin, fix #6111 (#6112)Zsombor2019-02-191-0/+1
|
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-184-1/+112
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-188-3/+41
|
* Allow labels to contain emoji (#6063)John Olheiser2019-02-161-0/+1
| | | | | | | | | | | | | | | | | | | * Add emoji to labels Minor cleanup of tribute code in footer.tmpl Signed-off-by: jolheiser <john.olheiser@gmail.com> * Quick find/replace in other i18n files containing label translations Signed-off-by: jolheiser <john.olheiser@gmail.com> * Revert "Quick find/replace in other i18n files containing label translations" This reverts commit ec3e1a3a1775989301bb2c1cd08e8871b317688d. * Add style to overwrite emoji height in labels * Revert Makefile change that makes Windows work
* make sure labels are actually returned (#6053)Lanre Adelowo2019-02-131-0/+5
|
* Allow markdown files to read from the LFS (#5787)zeripath2019-02-123-28/+101
| | | | | | | This PR makes it possible for the markdown renderer to render images and media straight from the LFS. Fix #5746 Signed-off-by: Andrew Thornton [art27@cantab.net](mailto:art27@cantab.net)
* Refactor editor upload, update and delete to use git plumbing and add LFS ↵zeripath2019-02-122-26/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | support (#5702) * Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFile * Use git plumbing for upload: #5621 repo_editor.go: GetDiffPreview * Use git plumbing for upload: #5621 repo_editor.go: DeleteRepoFile * Use git plumbing for upload: #5621 repo_editor.go: UploadRepoFiles * Move branch checkout functions out of repo_editor.go as they are no longer used there * BUGFIX: The default permissions should be 100644 This is a change from the previous code but is more in keeping with the default behaviour of git. Signed-off-by: Andrew Thornton <art27@cantab.net> * Standardise cleanUploadFilename to more closely match git See verify_path in: https://github.com/git/git/blob/7f4e64169352e03476b0ea64e7e2973669e491a2/read-cache.c#L951 Signed-off-by: Andrew Thornton <art27@cantab.net> * Redirect on bad paths Signed-off-by: Andrew Thornton <art27@cantab.net> * Refactor to move the uploading functions out to a module Signed-off-by: Andrew Thornton <art27@cantab.net> * Add LFS support Signed-off-by: Andrew Thornton <art27@cantab.net> * Update upload.go attribution header Upload.go is essentially the remnants of repo_editor.go. The remaining code is essentially unchanged from the Gogs code, hence the Gogs attribution. * Delete upload files after session committed * Ensure that GIT_AUTHOR_NAME etc. are valid for git see #5774 Signed-off-by: Andrew Thornton <art27@cantab.net> * Add in test cases per @lafriks comment * Add space between gitea and github imports Signed-off-by: Andrew Thornton <art27@cantab.net> * more examples in TestCleanUploadName Signed-off-by: Andrew Thornton <art27@cantab.net> * fix formatting Signed-off-by: Andrew Thornton <art27@cantab.net> * Set the SSH_ORIGINAL_COMMAND to ensure hooks are run Signed-off-by: Andrew Thornton <art27@cantab.net> * Switch off SSH_ORIGINAL_COMMAND Signed-off-by: Andrew Thornton <art27@cantab.net>
* In basic auth check for tokens before call UserSignIn (#5725)manuelluis2019-02-121-37/+37
| | | | | | | | | | * Check first if user/password is a token * In basic auth check if user/password is a token * Remove unnecessary else statement * Changes of fmt
* Add the Owner Name to differentiate when merging (#3807)Luo Yifei2019-02-121-0/+2
|
* fix #3200 (#6033)Lanre Adelowo2019-02-111-1/+1
|
* Add option to close issues via commit on a non master branch (#5992)Lanre Adelowo2019-02-101-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixes #5957 * add tests to make sure config option is respected * use already defined struct * - use migration to make the flag repo wide not for the entire gitea instance Also note that the config value can still be set so as to be able to control the value for new repositories that are to be created - fix copy/paste error in copyright header year and rearrange import - use repo config instead of server config value to determine if a commit should close an issue - update testsuite * use global config only when creating a new repository * allow repo admin toggle feature via UI * fix typo and improve testcase * fix fixtures * add DEFAULT prefix to config value * fix test
* Fix metrics auth token detection (#6006)Paul2019-02-091-1/+1
| | | Signed-off-by: Pauls Barkans <paulsb@gmail.com>
* Feature - #3031 - search for org repos (#5986)Richard Mahn2019-02-081-9/+60
|