aboutsummaryrefslogtreecommitdiffstats
path: root/models/wiki.go
Commit message (Collapse)AuthorAgeFilesLines
* Add owner_name column for table repository for maintaince reason (#9717)Lunny Xiao2020-01-121-2/+3
| | | | | | | | | | | | | | * Add owner_name column for table repository for maintaince reason * refactor * Fix tests * fix test * fix bug when fork repository Co-authored-by: zeripath <art27@cantab.net>
* Move wiki related funtions from models to services/wiki (#9355)Lunny Xiao2020-01-071-313/+0
| | | | * Move wiki related funtions from models to services/wiki
* Add Close() method to gogitRepository (#8901)zeripath2019-11-131-0/+2
| | | | | | | | | In investigating #7947 it has become clear that the storage component of go-git repositories needs closing. This PR adds this Close function and adds the Close functions as necessary. In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files. Fixes #7947
* Sign merges, CRUD, Wiki and Repository initialisation with gpg key (#7631)zeripath2019-10-161-3/+18
| | | | | | | | | | | | | | | | | | | This PR fixes #7598 by providing a configurable way of signing commits across the Gitea instance. Per repository configurability and import/generation of trusted secure keys is not provided by this PR - from a security PoV that's probably impossible to do properly. Similarly web-signing, that is asking the user to sign something, is not implemented - this could be done at a later stage however. ## Features - [x] If commit.gpgsign is set in .gitconfig sign commits and files created through repofiles. (merges should already have been signed.) - [x] Verify commits signed with the default gpg as valid - [x] Signer, Committer and Author can all be different - [x] Allow signer to be arbitrarily different - We still require the key to have an activated email on Gitea. A more complete implementation would be to use a keyserver and mark external-or-unactivated with an "unknown" trust level icon. - [x] Add a signing-key.gpg endpoint to get the default gpg pub key if available - Rather than add a fake web-flow user I've added this as an endpoint on /api/v1/signing-key.gpg - [x] Try to match the default key with a user on gitea - this is done at verification time - [x] Make things configurable? - app.ini configuration done - [x] when checking commits are signed need to check if they're actually verifiable too - [x] Add documentation I have decided that adjusting the docker to create a default gpg key is not the correct thing to do and therefore have not implemented this.
* Use gitea forked macaron (#7933)Tamal Saha2019-08-231-1/+1
| | | Signed-off-by: Tamal Saha <tamal@appscode.com>
* Fix bug create/edit wiki pages when code master branch protected (#7580)Lunny Xiao2019-07-251-1/+7
| | | | | | * fix bug create/edit wiki pages when code master branch protected * improve FullPushingEnvironment function
* Add golangci (#6418)kolaente2019-06-121-2/+10
|
* Remove local clones & make hooks run on merge/edit/upload (#6672)zeripath2019-05-111-80/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add options to git.Clone to make it more capable * Begin the process of removing the local copy and tidy up * Remove Wiki LocalCopy Checkouts * Remove the last LocalRepo helpers * Remove WithTemporaryFile * Enable push-hooks for these routes * Ensure tests cope with hooks Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Repository.LocalCopyPath() * Move temporary repo to use the standard temporary path * Fix the tests Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove LocalWikiPath * Fix missing remove Signed-off-by: Andrew Thornton <art27@cantab.net> * Use AppURL for Oauth user link (#6894) * Use AppURL for Oauth user link Fix #6843 * Update oauth.go * Update oauth.go * internal/ssh: ignore env command totally (#6825) * ssh: ignore env command totally * Remove commented code Needed fix described in issue #6889 * Escape the commit message on issues update and title in telegram hook (#6901) * update sdk to latest (#6903) * improve description of branch protection (fix #6886) (#6906) The branch protection description text were not quite accurate. * Fix logging documentation (#6904) * ENABLE_MACARON_REDIRECT should be REDIRECT_MACARON_LOG * Allow DISABLE_ROUTER_LOG to be set in the [log] section * [skip ci] Updated translations via Crowdin * Move sdk structs to modules/structs (#6905) * move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor
* move code.gitea.io/git to code.gitea.io/gitea/modules/git (#6364)Lunny Xiao2019-03-271-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix serving of raw wiki files other than .md (#5814)Gabriel Silva Simões2019-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix serving of raw wiki files other than .md Closes #4690. Closes #4395. Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Simplify code at routers/repo/wiki.go Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add more files to user2/repo1.wiki for testing Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Update macaron to v1.3.2 Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add tests for WikiRaw Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Fix NewResponseWriter usage due to macaron update Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com> * Add raw to reserved wiki names Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
* Fix deadlock when sqlite (#5118)Lunny Xiao2018-10-191-1/+1
| | | | | | * fix deadlock when sqlite * fix clonelink deadlock on sqlite
* Fix to use only needed columns from tables to get repository git paths (#3870)Lauris BH2018-05-021-1/+1
|
* Fix rendering of wiki page list if wiki repo contains other files (#3454)Lauris BH2018-02-051-1/+1
| | | | | | * Fix rendering of wiki page list if wiki repo contains other files * Improve wiki filename tests
* Remove hardcoded paths to fix randomly failing tests (#3347)Lauris BH2018-01-111-1/+9
| | | | | | * Remove hardcoded paths to fix randomly failing tests * Use correct function for merge path
* Various wiki bug fixes (#2996)Ethan Koenig2017-11-281-42/+55
| | | | | | * Update macaron * Various wiki bug fixes
* Update code.gitea.io/git (#1824)Ethan Koenig2017-05-301-2/+8
| | | | | | | | * Update code.gitea.io/git * Update function calls * govendor fetch
* fix wiki bugs (#1294)Lunny Xiao2017-03-201-1/+5
|
* Take back control of hooks (#1006)Lunny Xiao2017-02-231-2/+2
| | | | | | | | | | | | | | | | * git: delegate all server-side Git hooks (#1623) * create hooks directories * take control hooks back * fix lint * bug fixed and minor changes * fix imports style * fix migration scripts
* Cleanup log messagingGabriel Jackson2017-02-021-2/+2
| | | | | | | | | This change corrects a few logging issues: * Standardized formatting errors with '%v'. * Standardized failure warning word usage. * Corrected an instance of using the standard log library when the gitea log library should be used instead.
* Unit tests for models/wikiEthan Koenig2017-01-271-1/+1
|
* Add a reserved path check to the wiki (#720)Bwko2017-01-221-1/+18
|
* fixed bugs on Wiki and resolved #667 (#674)Lunny Xiao2017-01-211-15/+15
|
* In the wiki title replace tab with a space (#371)Bwko2016-12-111-0/+1
|
* Fix for #320Bwko2016-12-031-3/+1
| | | | Suppress the error when we're removing a file that may not exist
* Catch os... errorsBwko2016-12-021-3/+13
|
* Fix lint errors in models/wiki (just add methods docs)Sandro Santilli2016-11-141-0/+6
| | | | See #70
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-3/+3
| | | | | | | - 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
* Replace gogits/git-module dependency with go-gitea/git (#94)Sandro Santilli2016-11-061-1/+1
| | | | | | | | * Replace gogits/git-module dependency with go-gitea/git Fixes #92 * Remove git alias for git module import (not needed)
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-2/+2
|
* modules/sync: rename SingleInstancePool to ExclusivePoolUnknwon2016-08-301-1/+1
|
* #3505 use user’s info for committer and authorUnknwon2016-08-271-2/+8
|
* #3467 fix clone fail when wiki is emptyUnknwon2016-08-151-1/+3
|
* Web editor: improve edit file and diff previewUnknwon2016-08-141-15/+2
|
* modules/sync: move sync objects to independent moduleUnknwon2016-08-141-5/+2
|
* Squashed commit of the following:Richard Mahn2016-08-141-39/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 0afcb843d7ffd596991c4885cab768273a6eb42c Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 17:13:29 2016 -0600 Removed Upload stats as the upload table is just a temporary table commit 7ecd73ff5535612d79d471409173ee7f1fcfa157 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:42:41 2016 -0600 Fix for CodeMirror mode commit c29b9ab531e2e7af0fb5db24dc17e51027dd1174 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 08:03:33 2016 -0600 Made tabbing in editor use spaces commit 23af384c53206a8a40e11e45bf49d7a149c4adcd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:56:46 2016 -0600 Fix for data-url commit cfb8a97591cb6fc0a92e49563b7b764c524db0e9 Merge: 7fc8a89 991ce42 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:42:53 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit 7fc8a89cb495478225b02d613e647f99a1489634 Merge: fd3d86c c03d040 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:40:00 2016 -0600 Merge branch 'feature-create-and-edit-repo-file' of github.com:richmahn/gogs into feature-create-and-edit-repo-file commit fd3d86ca6bbc02cfda566a504ffd6b03db4f75ef Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Sun Jul 31 07:39:44 2016 -0600 Code cleanup commit c03d0401c1049eeeccc32ab1f9c3303c130be5ee Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 29 15:38:23 2016 -0600 Code cleanup commit 98e1206ccf9f9a4503c020e3a7830cf9f861dfae Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:36:01 2016 -0600 Code cleanup and fixes commit c2895dc742f25f8412879c9fa15e18f27f42f194 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 18:24:04 2016 -0600 Fixes per Unknwon's requests commit 6aa7e46b21ad4c96e562daa2eac26a8fb408f8ef Merge: 889e9fa ad7ea88 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Thu Jul 28 17:13:43 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go modules/setting/setting.go commit 889e9faf1bd8559a4979c8f46005d488c1a234d4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:09:18 2016 -0600 Fix in gogs.js commit 47603edf223f147b114be65f3bd27bc1e88827a5 Merge: bb57912 cf85e9e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:07:36 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go public/js/gogs.js commit bb5791255867a71c11a77b639db050ad09c597a4 Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 22 14:02:18 2016 -0600 Update for using CodeMirror mode addon commit d10d128c51039be19e2af9c66c63db66a9f2ec6d Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 16:12:57 2016 -0600 Update for Edit commit 34a34982025144e3225e389f7849eb6273c1d576 Merge: fa1b752 1c7dcdd Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Tue Jul 19 11:52:02 2016 -0600 Merge remote-tracking branch 'gogits/develop' into feature-create-and-edit-repo-file Conflicts: modules/bindata/bindata.go commit fa1b752be29cd455c5184ddac2ffe80b3489763e Author: Richard Mahn <richard_mahn@wycliffeassociates.org> Date: Fri Jul 15 18:35:42 2016 -0600 Feature for editing, creating, uploading and deleting files
* #3233 code cleanup and minor issue fixUnknwon2016-08-111-0/+2
|
* Fix wiki vulnerabilitiesUnknwon2016-07-011-4/+13
| | | | | | | - Arbitrary file creation leading to command execution - .md file creation/deletion Reported by Gabriel Campana.
* Minor fixes for #2746Unknwon2016-03-041-26/+25
|
* Add ability to delete single wiki pages.Josh Frye2016-03-041-0/+37
|
* Removed empty line, multi return argsJofkos2015-12-201-3/+3
|
* Wiki pages containing question marks in their name weren't loadingJofkos2015-12-201-2/+4
| | | (untested)
* rename import pathUnknwon2015-12-151-1/+1
|
* fix APIUnknwon2015-12-011-1/+1
|
* finish wikiUnknwon2015-11-301-0/+5
|
* wiki: finish editUnknwon2015-11-271-3/+22
|
* wiki: finish newUnknwon2015-11-271-3/+101
|
* introduce git-shellUnknwon2015-11-261-0/+56