summaryrefslogtreecommitdiffstats
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
* Fix #5799 - swagger for mergePullRequest (#5996)Thomas Loubiou2019-02-081-0/+3
|
* use native golang SSH library but ssh-keygen when enable built-in SSH server ↵Lunny Xiao2019-02-071-2/+43
| | | | | | | | to remove dependent on that command lines (#5976) * use native golang SSH library but ssh-keygen when enable built-in SSH server to remove dependent on that command lines * fix tests and add comment head
* Feature - Pagination for git tree API (#5838)Richard Mahn2019-02-061-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Feature - Pagination for git tree API * Handles case when page is negative * Does a for loop over the start and end rather than all entries * Removed redundent logic * Adds per_page as a query parameter * Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt * Fix typo in cheat-sheet en * Makes page start at 1, generated swagger * Use updates to SDK * Updates to use latest sdk * Updates swagger for tree api * Adds test for GetTreeBySHA * Updates per PR reviews * Updates per PR reviews * Remove file * Formatting * Fix to swagger file * Fix to swagger * Update v1_json.tmpl * Fix to swagger file
* Allow Macaron to be set to log through to gitea.log (#5667)zeripath2019-02-052-4/+48
| | | | | | * Allow Macaron to be set to log through gitea.log Fix #4291
* add other session providers (#5963)techknowlogick2019-02-051-2/+7
|
* Fix ssh deploy and user key constraints (#1357) (#5939)zeripath2019-02-031-0/+25
| | | | | | | | | | | | | | | | 1. A key can either be an ssh user key or a deploy key. It cannot be both. 2. If a key is a user key - it can only be associated with one user. 3. If a key is a deploy key - it can be used in multiple repositories and the permissions it has on those repositories can be different. 4. If a repository is deleted, its deploy keys must be deleted too. We currently don't enforce any of this and multiple repositories access with different permissions doesn't work at all. This PR enforces the following constraints: - [x] You should not be able to add the same user key as another user - [x] You should not be able to add a ssh user key which is being used as a deploy key - [x] You should not be able to add a ssh deploy key which is being used as a user key - [x] If you add an ssh deploy key to another repository you should be able to use it in different modes without losing the ability to use it in the other mode. - [x] If you delete a repository you must delete all its deploy keys. Fix #1357
* Make log mailer for testing (#5893)zeripath2019-02-022-6/+35
| | | | | | | | | | | | | | | | | | * Create log mailer for testing email settings Signed-off-by: Andrew Thornton <art27@cantab.net> * Switch on the log mailer for the integration tests This ensures that the sending mail process works Signed-off-by: Andrew Thornton <art27@cantab.net> * rename the from user for mysql/mssql * rename log sender to dummy sender * update the integration tests
* Fix bug when read public repo lfs file (#5912)Lunny Xiao2019-01-311-2/+5
| | | | | | * fix bug when read public repo lfs file * add comment on lfs permission check
* Recover panic in orgmode.Render if bad orgfile (#4982) (#5903)zeripath2019-01-301-4/+10
| | | | | | | This PR protects against the panic referred to in chaseadmsio/goorgeous#82 by recovering from the panic and just returning the raw bytes if there is an error. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Provide better panic handling (#5902)zeripath2019-01-302-1/+113
| | | | | | | This PR gitea'ises the macaron.Recovery() handler meaning that in the event of panic we get proper gitea 500 pages and the stacktrace is logged with the gitea logger. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Only allow local login if password is non-empty (#5906)zeripath2019-01-301-1/+1
|
* Fix go-get URL generation (#5905)Lauris BH2019-01-302-2/+3
|
* Config option to disable automatic repo watching (#5852)sebastian-sauer2019-01-271-0/+2
| | | | | | | | | Add a new config option to enable / disable the automatic watching of repos for new repositories and if a user is added to a team. Fixes #653 Signed-off-by: Sebastian Sauer <sauer.sebastian@gmail.com>
* improve the releases api paging (#5831)Lunny Xiao2019-01-241-0/+2
| | | | | | * improve the releases api paging * add max limit on API paging
* Fix TLS errors when using acme/autocert for local connections (#5820)Joona Hoikkala2019-01-231-0/+1
|
* Request for public keys only if LDAP attribute is set (#5816)Lauris BH2019-01-241-11/+29
| | | | | | * Update go-ldap dependency * Request for public keys only if attribute is set
* Feature: Archive repos (#5009)kolaente2019-01-232-1/+11
|
* Pooled and buffered gzip implementation (#5722)zeripath2019-01-232-0/+458
| | | | | | | | | | | | | | | | | | | * Pooled and buffered gzip implementation * Add test for gzip * Add integration test * Ensure lfs check within transaction The previous code made it possible for a race condition to occur whereby a LFSMetaObject could be checked into the database twice. We should check if the LFSMetaObject is within the database and insert it if not in one transaction. * Try to avoid primary key problem in postgres The integration tests are being affected by https://github.com/go-testfixtures/testfixtures/issues/39 if we set the primary key high enough, keep a count of this and remove at the end of each test we shouldn't be affected by this.
* Disallow empty titles (#5785)Lanre Adelowo2019-01-212-0/+22
| | | | | | | | | | | | * add util method and tests * make sure the title of an issue cannot be empty * wiki title cannot be empty * pull request title cannot be empty * update to make use of the new util methof
* Make db connect more robust (#5738)Paul Brackin2019-01-191-6/+10
|
* Moved defaults in defaults.go to setting.go (#5764)John Olheiser2019-01-192-15/+9
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* ldap: Adjust log settings when a user is not found. (#5771)Harshit Bansal2019-01-191-3/+3
| | | Fixes: #3849.
* Log IP of failed ssh connection (#5766)Robert Sprunk2019-01-191-2/+2
| | | | | Fix #5765 by log the IP address of a connecting remote machine in case of a SSH connection error for the built-in ssh server. Signed-off-by: Robert Sprunk <github@sprunk.me>
* Refactor repo.isBare to repo.isEmpty #5629 (#5714)zeripath2019-01-172-6/+6
| | | | | | | | * Refactor repo.isBare to repo.isEmpty #5629 Signed-off-by: Andrew Thornton <art27@cantab.net> * Remove Sync call
* Refactor notification for indexer (#5111)Lunny Xiao2019-01-172-0/+64
| | | | | | * notification for indexer * use NullNotifier as parent struct
* Support CORS headers to git smart http protocol (#5719)Lunny Xiao2019-01-141-18/+20
|
* Prioritize "readme.md" (#5691)Khaled Hamed2019-01-142-2/+29
| | | | | | | | * prioritize readme.md * Improve IsReadmeFile * Add more tests
* Discord Oauth2 support (#4476)techknowlogick2019-01-131-0/+3
| | | | | | | | | | | | | | * add discord auth * add vendor for discord * fix syntax error * make fmt * update version of goth in use * update markbates/goth
* Refactor mail notification (#5110)Lunny Xiao2019-01-135-46/+185
| | | | | | | | * mail notification implement interface * fix file comment year * use NullNotifier as parent struct of notifiers
* When redirecting clean the path to avoid redirecting to //www.othersite.com ↵zeripath2019-01-091-1/+1
| | | | | | | (#5669) Fix #5627 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Allow for user specific themes (#5668)Lanre Adelowo2019-01-093-4/+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
* Synchronize SSH keys on login with LDAP + Fix SQLite deadlock on ldap ssh ↵zeripath2018-12-271-7/+9
| | | | | | | | key deletion (#5557) * Synchronize SSH keys on login with LDAP * BUG: Fix hang on sqlite during LDAP key deletion
* LDAP via simple auth separate bind user and search base (#5055)Tony Homrich2018-12-271-11/+29
|
* Add rebase with merge commit merge style (#3844) (#4052)Julian2018-12-271-1/+2
| | | Signed-off-by: Julian Tölle <julian.toelle97@gmail.com>
* fix indexer reindex bug when gitea restart (#5563)Lunny Xiao2018-12-192-8/+19
| | | | | | * fix issue indexer bug reindex when restart gitea * also fix code indexer reindex when gitea restart
* fix lfs version check warning log when using ssh protocol (#5501)Lunny Xiao2018-12-191-21/+21
|
* Support reverse proxy providing email (#5554)zeripath2018-12-182-10/+21
| | | This PR implements #2347
* fix clone wiki failed via ssh (#5503)Lunny Xiao2018-12-111-0/+33
|
* Approvals at Branch Protection (#5350)Jonas Franz2018-12-111-7/+10
| | | | | | | | | | | | | | | | | | | | | | * 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>
* Restrict permission check on repositories and fix some problems (#5314)Lunny Xiao2018-11-285-134/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Explicitly disable Git credential helper (#5367)Michael Kuhn2018-11-281-17/+12
| | | | | | | | | | | | | | | | | | | | | | | | | * Explicitly disable Git credential helper If the user running Gitea has configured a credential helper, Git credentials might leak out of Gitea. There are two problems with credential helpers when combined with Gitea: 1. Credentials entered by a user when doing a migration or setting up a mirror will end up in the credential store. In the worst case, this is the plain text file ~/.git-credentials. 2. Credentials in the credential store will be used for migrations and mirrors by all users. For example, if user A sets up a mirror, their credentials will be stored. If user B later sets up a mirror from the same host and does not enter any credentials, user A's credentials will be used. This PR prepends -c credential.helper= to all Git commands to clear the list of helpers. This requires at least Git version 2.9, as previous versions will try to load an empty helper instead. For more details, see https://github.com/git/git/commit/24321375cda79f141be72d1a842e930df6f41725 * Update git module
* Create Progressive Web App (#4730)SohnyBohny2018-11-272-0/+21
| | | | | | | | | | | | | | | | | | | | | | * 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
* Refactor heatmap to vue component (#5401)Lauris BH2018-11-272-5/+0
|
* Explicitly decide whether to use TLS in mailer's configuration (#5024)Lanre Adelowo2018-11-262-3/+4
| | | | | | | | * explicitly decide on using TLS for mail connections * explicitly decide on using TLS for mail connections * keep compatibility
* support envs on external render commands (#5278)Lunny Xiao2018-11-201-5/+17
|
* Add raw blob endpoint to get objects by SHA ID (#5334)Peter Hoffmann2018-11-181-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Block registration based on email domain (#5157)Lanre Adelowo2018-11-143-0/+95
| | | * implement email domain whitelist
* Remove maxlines option for file logger (#5282)Lauris BH2018-11-072-22/+3
|
* Prometheus endpoint (#5256)Stanislav2018-11-042-0/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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-0/+13
| | | | | | | | | | 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