summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rename db Engines related functions (#17481)Lunny Xiao2021-10-3014-31/+31
| | | | | * Rename db Engines related functions Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Quote the table name in CountOrphanedObjects (#17487)zeripath2021-10-301-1/+1
| | | | | | | | | CountOrphanedObjects needs to quote the table it is joining with as this table may be `user`. Fix #17485 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-307-12/+7
|
* Run Migrate in Install rather than just SyncTables (#17475)zeripath2021-10-292-4/+24
| | | | | | | | | | | | | | | | | | * Run Migrate in Install rather than just SyncTables The underlying problem in #17328 appears to be that users are re-running the install page during upgrades. The function that tests and creates the db did not intend for this and thus instead the migration scripts being run - a simple sync tables occurs. This then causes a weird partially migrated DB which causes, in this release cycle, the duplicate column in task table error. It is likely the cause of some weird partial migration errors in other cycles too. This PR simply ensures that the migration scripts are also run at this point too. Fix #17328 Signed-off-by: Andrew Thornton <art27@cantab.net>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-295-6/+57
|
* Update docs/config.yaml to 1.15.6 (#17472)zeripath2021-10-281-1/+1
| | | | | Update the version in docs/config.yaml to 1.15.6 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Move key forms before list and add cancel button (#17432)qwerty2872021-10-284-89/+80
| | | | | | | * Move GPG form before list and add cancel button * Move SSH form before list and add cancel button Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix login redirection links (#17451)qwerty2872021-10-281-1/+1
| | | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Changelog 1.15.6 (#17457) (#17468)zeripath2021-10-281-0/+11
| | | | | | | | | | | | | | Frontport #17457 ## [1.15.6](https://github.com/go-gitea/gitea/releases/tag/v1.15.6) - 2021-10-28 * BUGFIXES * Prevent panic in serv.go with Deploy Keys (#17434) (#17435) * Fix CSV render error (#17406) (#17431) * Read expected buffer size (#17409) (#17430) * Ensure that restricted users can access repos for which they are members (#17460) (#17464) * Make commit-statuses popup show correctly (#17447) (#17466) * TESTING * Add integration tests for private.NoServCommand and private.ServCommand (#17456) (#17463)
* Fix mispelling of starred as stared (#17465)zeripath2021-10-282-2/+2
| | | | | | | | | | There was a recent spelling mistake added to the locale file where stared was used instead of starred. This PR changes this to starred. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Ensure that restricted users can access repos for which they are members ↵zeripath2021-10-284-4/+67
| | | | | | | | | | | | | | | | | (#17460) There is a small bug in the way that repo access is checked in repoAssignment: Accessibility is checked by checking if the user has a marked access to the repository instead of checking if the user has any team granted access. This PR changes this permissions check to use HasAccess() which does the correct test. There is also a fix in the release api ListReleases where it should return draft releases if the user is a member of a team with write access to the releases. The PR also adds a testcase. Signed-off-by: Andrew Thornton <art27@cantab.net>
* make commit-statuses popup can be shown correctly. (#17447)wxiaoguang2021-10-282-3/+19
| | | | | | | | | | Close #17443 Maybe we do not need to backport this PR, the bug doesn't break daily usage. After the fix, the commit statuses popup can show a lot of lines with scroll bars: ![image](https://user-images.githubusercontent.com/2114189/139026160-f01b484c-6207-494a-a190-a6dd184ceb2b.png)
* Add integration tests for private.NoServCommand and private.ServCommand (#17456)zeripath2021-10-281-0/+154
| | | | | | | | modules/private/serv.go has two major functions that are missing testcases to ensure that Deploy and normal SSH keys work correctly. This PR adds some basic integration tests for these. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Add appearance section in settings (#17433)qwerty2872021-10-279-89/+161
| | | | | | | | | | | | | * Add appearance section in settings * Fix lint * Fix lint * Apply suggestions from code review Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix a UI error when folding a file content in a commit view (#17446)wxiaoguang2021-10-272-3/+2
|
* Show client-side error if wiki page is empty (#17415)David Jimenez2021-10-272-3/+21
| | | | | | | | | | | | | | | * fix: show client-side error if wiki page is empty Implement a JS, client-side validation workaround for a bug in the upstream editor library SimpleMDE which breaks HTML5 client-side validation when a wiki page is submitted. This allows native, client-side errors to appear if the text editor contents are empty. See upstream bugfix report: https://github.com/sparksuite/simplemde-markdown-editor/issues/324 Signed-off-by: David Jimenez <dvejmz@sgfault.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Fixes #16559 - Do not trim leading spaces for tab delimited (#17442)Richard Mahn2021-10-262-8/+53
| | | | | | | | | | | * Fixes #16559 - Do not trim leading spaces for tab delimited * Adds back semicolon delimited test * Fixes linting * Adds nolint directive to test because uses strings starting with spaces Co-authored-by: zeripath <art27@cantab.net>
* Fix docker rootless build (#17441)wxiaoguang2021-10-261-1/+1
|
* Tune UI alignment for nav bar notification icon, avatar image, issue label ↵wxiaoguang2021-10-262-0/+3
| | | | (#17438)
* Upgrade go-github to v39 (#17437)Lunny Xiao2021-10-26126-169/+2563
|
* Prevent panic in serv.go with Deploy Keys (#17434)zeripath2021-10-261-1/+1
| | | | | | | | Unfortunately there was a regression in #17373 which missed that the user is not for deploy keys. This leads to a panic when pushing with deploy keys. Fix #17412 Signed-off-by: Andrew Thornton <art27@cantab.net>
* chmod executables when copying to the docker (#17423)zeripath2021-10-252-1/+4
| | | | | | | | | Run chmod on the executables and the entrypoint when copying them to the docker in dockerfile. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Norwin <noerw@users.noreply.github.com> Co-authored-by: delvh <dev.lh@web.de>
* Upgrade webpack to 5.59.1 to resolve the `waitFor` bug with `watch-frontend` ↵wxiaoguang2021-10-252-8/+8
| | | | | (#17428) Webpack < 5.59 has a bug, which makes watch-frontend fail when editing .less files.
* fix markdown checkbox rendering (#17425)wxiaoguang2021-10-251-0/+6
|
* In many cases user avatar link should be an absolute URL with http host (#17420)wxiaoguang2021-10-253-3/+9
|
* Add API to get/edit wiki (#17278)qwerty2872021-10-258-1/+1336
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add API to get/edit wiki * Add swagger docs, various improvements * fmt * Fix lint and rm comment * Add page parameter * Add pagination to pages * Add tests * fmt * Update func names * Update error handling * Update type name * Fix lint * Don't delete Home * Update func name * Update routers/api/v1/repo/wiki.go Co-authored-by: delvh <dev.lh@web.de> * Remove unnecessary check * Fix lint * Use English strings * Update integrations/api_wiki_test.go Co-authored-by: delvh <dev.lh@web.de> * Update func and test names * Remove unsed check and avoid duplicated error reports * Improve error handling * Return after error * Document 404 error * Update swagger * Fix lint * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Document file encoding * fmt * Apply suggestions * Use convert * Fix integration test * simplify permissions * unify duplicate key Title/Name * improve types & return UTC timestamps * improve types pt.2 - add WikiPageMetaData.LastCommit - add WikiPageMetaData.HTMLURL - replace WikiPageMetaData.Updated with .LastCommit.Committer.Created also delete convert.ToWikiPage(), as it received too many arguments and only had one callsite anyway. sorry for bad advice earlier 🙃 * WikiPage.Content is base64 encoded * simplify error handling in wikiContentsByName() * update swagger * fix & DRY findWikiRepoCommit() error handling ListWikiPages() previously wrote error twice when repo wiki didn't exist * rename Content -> ContentBase64 * Fix test * Fix tests * Update var name * suburl -> sub_url Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Norwin <git@nroo.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-251-0/+6
|
* Fix CSV render error (#17406)KN4CK3R2021-10-252-22/+21
| | | | | | | | | | | closed #17378 Both errors from #17378 were caused by #15175. Problem 1 (error with added file): `ToUTF8WithFallbackReader` creates a `MultiReader` from a `byte[2048]` and the remaining reader. `CreateReaderAndGuessDelimiter` tries to read 10000 bytes from this reader but only gets 2048 because that's the first reader in the `MultiReader`. Then the `if size < 1e4` thinks the input is at EOF and just returns that. Problem 2 (error with changed file): The blob reader gets defer closed. That was fine because the old version reads the whole file into memory. Now with the streaming version the close needs to defer after the method.
* Read expected buffer size (#17409)KN4CK3R2021-10-2411-29/+51
| | | | | | * Read expected buffer size. * Changed name.
* Add HAProxy Config to reverse-proxies.en-us.md (#17407)Kane2021-10-241-0/+47
| | | | | | | * Update reverse-proxies.en-us.md Addition of HAProxy * Update reverse-proxies.en-us.md
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-241-1/+7
|
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-230-0/+0
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue content history problems, improve UI (#17404)wxiaoguang2021-10-234-8/+11
| | | | | * Improve: make diff result better, make the HTML element fit the full height in the content history diff dialog * Bug fix: when edit the main issue, the poster is wrongly set to the issue poster
* Fix issue markdown bugs (#17411)wxiaoguang2021-10-233-2/+9
| | | | * Bug fix: render Markdown http://AppURL/org/repo/issues/4?a=1&b=2#comment-123 test to HTML correctly, close #17394 * Bug fix: fix the positions of checkboxes in rendered HTML, close #17395
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-238-6/+14
|
* Remove deprecated `extendDefaultPlugins` method of svgo (#17399)Mashiro2021-10-221-3/+4
|
* Frontport Changelog 1.15.5 (#17392) (#17401)zeripath2021-10-222-1/+18
|
* Fix context popup error (#17398)wxiaoguang2021-10-223-2/+29
| | | * Fix context popup error
* Add groups scope/claim to OIDC/OAuth2 Provider (#17367)Nico Schieder2021-10-223-7/+57
| | | | | | | | | | | * Add groups scope/claim to OICD/OAuth2 Add support for groups claim as part of the OIDC/OAuth2 flow. Groups is a list of "org" and "org:team" strings to allow clients to authorize based on the groups a user is part of. Signed-off-by: Nico Schieder <code@nico-schieder.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Stop sanitizing full name in API (#17396)zeripath2021-10-221-2/+1
| | | | | | | | | | The API convert.toUser function makes the incorrect assumption that full names could be rendered as is without being escaped. It therefore runs the names through markup.Sanitize which leads to a double escape of user full names. This pr stops this. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-10-222-0/+38
|
* Re-separate the color translation strings (#17390)zeripath2021-10-214-5/+7
| | | | | Fix #17384 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix the click behavior for <tr> and <td> with [data-href] (#17388)wxiaoguang2021-10-211-8/+13
|
* Refactor update checker to use AppState (#17387)wxiaoguang2021-10-216-61/+48
| | | | | | | | We have the `AppState` module now, it can store app related data easily. We do not need to create separate tables for each feature. So the update checker can use `AppState` instead of a one-row dedicate table. And the code of update checker is moved from `models` to `modules`.
* Fix SVG side by side comparison link (#17375)Mario Lubenka2021-10-212-7/+6
| | | | | | | | | | | | | | | | | * Remove swipe-bar z-index Fixes position of swipe-bar so it does not overlay other UI components when scrolling. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> * Unique names for image tabs in pull request Define unique names for image tabs in pull requests, in order to toggle tabs correctly when multiple are displayed on one page. Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix history count failure (#17351)Lunny Xiao2021-10-211-1/+1
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Sync gitea app path for git hooks and authorized keys when starting (#17335)wxiaoguang2021-10-2111-55/+338
| | | | | | | | | | | Gitea writes its own AppPath into git hook scripts. If Gitea's AppPath changes, then the git push will fail. This PR: * Introduce an AppState module, it can persist app states into database * During GlobalInit, Gitea will check if the current AppPath is the same as last one. If they don't match, Gitea will sync git hooks. * Refactor some code to make them more clear. * Also, "Detect if gitea binary's name changed" #11341 is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
* Handle broken references in mirror sync (#17013)zeripath2021-10-211-13/+105
| | | | | | | | | | | * Handle broken references in mirror sync If there are broken references during a mirror attempt to fix using `git remote prune`. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Frontend refactor, PascalCase to camelCase, remove unused code (#17365)wxiaoguang2021-10-2142-182/+162
| | | | | * Frontend refactor, PascalCase to camelCase, remove unused code * fix
* Fix heatmap test (#17381)Lunny Xiao2021-10-211-0/+6
|