aboutsummaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-082-4/+43
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Remove IsOwner, NumTeams from OrgUser (#3269)Ethan Koenig2018-01-087-77/+63
|
* Add missing indexer doc in configuration (#3324)Antoine GIRARD2018-01-081-1/+1
| | | | | | * Add missing indexer doc in configuration * Unify MAX_FILE_SIZE to 1024 * 1024
* fix bug when a user delete but assigned on issue (#3318)Lunny Xiao2018-01-071-2/+8
|
* Writable deploy keys (closes #671) (#3225)Vlad Temian2018-01-074-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add is_writable checkbox to deploy keys interface * Add writable key option to deploy key form * Add support for writable ssh keys in the interface * Rename IsWritable to ReadOnly * Test: create read-only and read-write deploy keys via api * Add DeployKey access mode migration * Update gitea sdk via govendor * Fix deploykey migration * Add unittests for writable deploy keys * Move template text to locale * Remove implicit column update * Remove duplicate locales * Replace ReadOnly field with IsReadOnly method * Fix deploy_keys related integration test * Rename v54 migration with v55 * Fix migration hell
* Add Pull Request merge options - Ignore white-space for conflict checking, ↵Lauris BH2018-01-057-22/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rebase, Squash merge (#3188) * Pull request options migration and UI in settings * Add ignore whitespace functionality * Fix settings if pull requests are disabled * Fix migration transaction * Merge with Rebase functionality * UI changes and related functionality for pull request merging button * Implement squash functionality * Fix rebase merging * Fix pull request merge tests * Add squash and rebase tests * Fix API method to reuse default message functions * Some refactoring and small fixes * Remove more hardcoded values from tests * Remove unneeded check from API method * Fix variable name and comment typo * Fix reset commit count after PR merge
* Serve pull request .diff files (#3293)Sandro Santilli2018-01-051-1/+3
| | | | | | | | | | | | * Serve pull request .diff files Closes #3259 * Add test for pull request redirection and .diff access * Typo * There's no need to test for pr.BaseRepo being nil after calling GetBaseRepo
* Use issue number/index instead of id for API URL. (#3298)Alberto González Palomo2018-01-031-1/+1
| | | | | | | | | | | | | | | | | Using the API calls, the issue objects retrieved by /repos/{owner}/{repo}/issues contains the wrong value in the "url" field: it uses the "id" value instead of the "number" value. For instance, in a new repo in try.gitea.io with just one issue: [{ "id": 896, "url": "https://try.gitea.io/api/v1/repos/AlbertoGP/uno/issues/896", "number": 1, ... }] The given URL does not work, but if you replace the "896" by "1" it does.
* Fixed asterisk based tasklist items, fixed requirement for one char after ↵modmew82018-01-031-2/+2
| | | | | last blank to be a valid task. (#3296) Signed-off-by: modmew8 <modmew8@gmail.com>
* Added progressbar for issues (#1146). (#3171)modmew82018-01-031-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | * Added progressbar for issues (#1146). * Updated the generated index.css. Signed-off-by: modmew8 <modmew8@gmail.com> * Removed stored progress percentage and changed it to css calc. Also added the issue task progress to the user/dashboard/issues. Signed-off-by: modmew8 <modmew8@gmail.com> * Removed unnecessary blanks. Signed-off-by: modmew8 <modmew8@gmail.com> * Formatted the files correctly, fmt-check terminates now without errors. Signed-off-by: modmew8 <modmew8@gmail.com> * Removed variables, made computing the tasks on demand with precompiled regexp. Signed-off-by: modmew8 <modmew8@gmail.com>
* Add repo-sync-releases admin command (#3254)Sandro Santilli2017-12-314-3/+10
| | | | | | | | | | | | | | | | | | * Add repo-sync-releases admin command Will help recovering corrupted database, see #3247 * Load repos in chunks of 10, exit with error if unable to get a list, scan private repos, fix typo * Fix debug output about num releases * Introduce RepositoryListDefaultPageSize constant, set to 64 Use it from the new admin command * Use RepositoryListDefaultPageSize in more places * Document RepositoryListDefaultPageSize
* Fix race condition in team functions (#3268)Ethan Koenig2017-12-301-5/+6
|
* go back to using CFB for AES decryption/encryption for 2FA (#3274)Morgan Bazalgette2017-12-311-3/+44
|
* Remove unused consts/vars (#3270)Ethan Koenig2017-12-301-13/+0
|
* Fix bugs in issue dashboard stats (#3073)Ethan Koenig2017-12-264-47/+195
|
* Small improve on deleting attachements (#3145)Lunny Xiao2017-12-241-8/+17
| | | | | | * Small improve on deleting attachements * improve the sequence of deletion
* Add more bench (#3161)Antoine GIRARD2017-12-241-7/+7
| | | | | | * Improve makefile + Add benchs * Apply recommendations of @ethantkoenig
* Fix ignored errors when checking if organization, team member (#3177)Ethan Koenig2017-12-216-77/+141
|
* Fix repo-transfer-and-team-repo-count bug (#3241)Ethan Koenig2017-12-192-14/+23
|
* Check ignored errors for issue and milestone count (#3213)Ethan Koenig2017-12-182-20/+52
|
* Remove unnecessary updates to issue indexer (#3212)Ethan Koenig2017-12-173-2/+22
|
* Unit tests for routers/repo/issue_label (#3198)Ethan Koenig2017-12-151-1/+18
|
* Improvements for supporting UI Location (#3146)Lunny Xiao2017-12-143-19/+14
| | | | | | * improvements for supporting UI Location * improved the comment
* Reorder migrations, skip errors if running migration again (#3160)Lauris BH2017-12-1313-292/+301
| | | | | | | | * Reorder migrations, skip errors if running migration again * Rename migration file names to match migration version * Add note about ingored error
* fix org owner cannot be removed if there is not in owner team (#3164)Lunny Xiao2017-12-131-1/+6
|
* Fix Uninitialized variable in ParsePatch (#3156)Kim "BKC" Carlbäcker2017-12-121-1/+1
|
* simple usage of x (#3144)Lunny Xiao2017-12-111-4/+1
|
* Refactor struct's time to remove unnecessary memory usage (#3142)Lunny Xiao2017-12-1131-407/+185
| | | | | | | | | | | | | | * refactor struct's time to remove unnecessary memory usage * use AsTimePtr simple code * fix tests * fix time compare * fix template on gpg * use AddDuration instead of Add
* Fixtures for public_key table (#3140)Ethan Koenig2017-12-111-0/+1
|
* Fix integration tests (#3141)Ethan Koenig2017-12-111-4/+9
|
* Fix compile failed without gcc (#3130)Lunny Xiao2017-12-101-1/+0
| | | | | | * fix comile failed without gcc * add sqlite tag for unit test
* Improve LFS tests + fix lfs url refs + keep path upper/lowercase in db. (#3092)Antoine GIRARD2017-12-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | * Add failing test * Fix urls * Improve url in tests * improve testing * Remove debug code * Add deps * LFS corner-case : Search on lower but store with case * Temporary comment of blocking action * fix hooks * Use temporary repo for git client test * Use userPassword in place of hard-coded password
* Fix repo indexer and submodule bug (#3107)Ethan Koenig2017-12-071-4/+4
|
* Add 'mark all read' option to notifications (#3097)Sasha Varlamov2017-12-073-4/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add 'mark all read' option to notifications Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> * Fix exported comment Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> * Format method comments Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> * Fix exported comment Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> Format method comments Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com> Tests for reactions (#3083) * Unit tests for reactions * Fix import order Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv> Fix reaction possition when there is attachments (#3099) Refactor notifications swap function * Accept change to drop beforeupdate call * Update purge notifications error message for consistency * Drop unnecessary check for mark all as read button * Remove debugging comment
* Delete a user's public key via admin api (closes #3014) (#3059)Vlad Temian2017-12-061-4/+1
| | | | | | | | | | | | | | | | * Delete a user's public key via admin api * Test admin ssh endpoint for creating a new ssh key * Adapt public ssh key test to also test the delete operation * Test that deleting a missing key will result in a 404 * Test that a normal user can't delete another user's ssh key * Make DeletePublicKey return err * Update swagger doc
* Tests for reactions (#3083)Lauris BH2017-12-052-2/+168
| | | | | | | | * Unit tests for reactions * Fix import order Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>
* Sort repos in issues dashboard sidebar (#3072)Ethan Koenig2017-12-041-0/+12
| | | | | | * Sort repos in issues dashboard sidebar * Sort repos by name
* Fix error message sanitiziation (#3082)Ethan Koenig2017-12-041-26/+7
|
* Add reactions to issues/PR and comments (#2856)Lauris BH2017-12-049-2/+354
|
* Fix avatar URLs (#3069)Ethan Koenig2017-12-031-5/+11
| | | | | | * Fix avatar URLs * import order
* Sanitize logs for mirror sync (#3057)Ethan Koenig2017-12-032-8/+46
|
* Fix ref parsing in commit messages (#3067)Ethan Koenig2017-12-033-102/+87
|
* Remove GetRepositoryByRef and add GetRepositoryByOwnerAndName (#3043)Lunny Xiao2017-12-023-22/+28
| | | | | | | | | | * remove GetRepositoryByRef and add GetRepositoryByOwnerAndName * fix tests * fix tests bug * some improvements
* Unit tests for wiki routers (#3022)Ethan Koenig2017-11-304-33/+65
|
* Fix git lfs path (#3016)Antoine GIRARD2017-11-292-1/+34
| | | | | | | | * add suffix .git * Remove Content-Type on GET methods * Add migrations to force creation before any further potential migration
* Improve memory usage when reaching diff limits (#2990)Duncan Ogilvie2017-11-291-12/+20
| | | Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
* Git LFS lock api (#2938)Antoine GIRARD2017-11-283-0/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement routes * move to api/sdk and create model * Implement add + list * List return 200 empty list no 404 * Add verify lfs lock api * Add delete and start implementing auth control * Revert to code.gitea.io/sdk/gitea vendor * Apply needed check for all lfs locks route * Add simple tests * fix lint * Improve tests * Add delete test + fix * Add lfs ascii header * Various fixes from review + remove useless code + add more corner case testing * Remove repo link since only id is needed. Save a little of memory and cpu time. * Improve tests * Use TEXT column format for path + test * fix mispell * Use NewRequestWithJSON for POST tests * Clean path * Improve DB format * Revert uniquess repoid+path * (Re)-setup uniqueness + max path length * Fixed TEXT in place of VARCHAR * Settle back to maximum VARCHAR(3072) * Let place for repoid in key * Let place for repoid in key * Let place for repoid in key * Revert back
* Various wiki bug fixes (#2996)Ethan Koenig2017-11-284-58/+208
| | | | | | * Update macaron * Various wiki bug fixes
* Don't print SQL in unit tests (#2995)Ethan Koenig2017-11-271-1/+4
| | | * Add GITEA_UNIT_TESTS_VERBOSE environment variable to enable printing SQL
* Enable admin to search by email (#2888)Ethan Koenig2017-11-261-8/+13
|