summaryrefslogtreecommitdiffstats
path: root/models
Commit message (Collapse)AuthorAgeFilesLines
* Fixed unitTypeCode not being used (#6419)kolaente2019-03-241-1/+1
|
* fix dump table name error and add some test for dump database (#6394)Lunny Xiao2019-03-203-3/+21
|
* fix migrations 82 to ignore unsynced tags between database and git data and ↵Lunny Xiao2019-03-201-6/+40
| | | | missing is_archived on repository table (#6387)
* make sure units of a team are returned (#6379)Lanre Adelowo2019-03-191-0/+5
|
* Implement Default Webhooks (#4299)Russell Aunger2019-03-182-1/+76
| | | | | | | | 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.
* Add bio field for user (#6113)techknowlogick2019-03-181-6/+6
| | | | Fix #4339
* Clean up various use of escape/unescape functions for URL generation (#6334)mrsdizzie2019-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Fix ParsePatch function to work with quoted diff --git strings (#6323)mrsdizzie2019-03-142-0/+65
| | | | | | | | | | | | | | | | * Fix ParsePatch to work properly with quoted diff --git string Currently ParsePatch fails when a diff contains a quoted diff line like: diff --git "a/file" "b/file" This patch makes it properly parse the line when that happens. Fixes #6309 * Add test for regular case while here * Simplify string modification
* Fix reported issue in repo description (#6306)zeripath2019-03-111-3/+5
|
* update git vendor to fix wrong release commit id and add migrations (#6224)Lunny Xiao2019-03-113-4/+94
| | | | | | | | | | * update git vendor to fix wrong release commit id and add migrations * fix count * fix migration release * fix tests
* Remove util.RemoveAll - should have been removed since go 1.7 (#6299)zeripath2019-03-101-1/+2
|
* Copyedit docs (#6275)Aidan Fitzgerald2019-03-092-2/+2
|
* Integrate OAuth2 Provider (#5378)Jonas Franz2019-03-088-0/+732
|
* Add robots.txt as reserved username (#6272)techknowlogick2019-03-071-0/+1
| | | Fix #6271
* Add ability to sort issues by due date (#6206) (#6244)stevegt2019-03-051-0/+4
| | | Signed-off-by: Steve Traugott <stevegt@t7a.org>
* Prevent double-close of issues (#6233)zeripath2019-03-041-1/+7
|
* Override xorm type mapping for U2F counter (#6232)Maurizio Porrato2019-03-044-1/+43
|
* add isAdmin to user model (#6231)Lanre Adelowo2019-03-032-0/+18
| | | | | update vendor and add tests fix swagger
* Fix renames over redirects (#6216)James E. Blair2019-03-021-1/+17
| | | | | | | | | | | | | | | | In #6211, we started creating repo_redirects for ownership transfers, however that opens an edge case where a user might perform the following sequence: rename org1/repo1 -> org1/repo2 (creates org1/repo1 redirect) transfer org2/repo1 -> org1/repo1 (org1/repo1 redirect continues to exist) rename org1/repo1 -> org1/repo3 (fails due to existing org1/repo1 redirect) This change ensures that each time we rename or transfer a repo, we delete any existing redirects at the target location. This already happens when a new repo is created. By doing this we ensure that we'll never have both a repo and a redirect at the same location. Signed-off-by: James E. Blair <jeblair@redhat.com>
* Add "ghost" and "notifications" to list of reserved user names. (#6208)tklein232019-02-271-0/+2
|
* Change sqlite DB path default to data directory (#6198)John Olheiser2019-02-271-1/+2
|
* fix bug when update owner team then visit team's repo return 404 (#6119)Lunny Xiao2019-02-222-0/+20
|
* Admins can now do unlimited page size user search (listAllUsers & ↵John Olheiser2019-02-211-0/+3
| | | | | listAllOrgs) (#6143) Non-admins will default to 10 page size
* Add more tests and docs for issue indexer, add db indexer type for searching ↵Lunny Xiao2019-02-212-0/+59
| | | | | | | | | | | | | | from database (#6144) * add more tests and docs for issue indexer, add db indexer type for searching from database * fix typo * fix typo * fix lint * improve docs
* refactor issue indexer, add some testing and fix a bug (#6131)Lunny Xiao2019-02-213-152/+5
| | | | | | | | * refactor issue indexer, add some testing and fix a bug * fix error copyright year on comment header * issues indexer package import keep consistent
* Refactor issue indexer (#5363)Lunny Xiao2019-02-196-94/+126
|
* Show email if the authenticated user owns the profile page being requested ↵Lanre Adelowo2019-02-191-0/+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-4/+55
| | | | | | | | | | | | * fix bug prohibit login not applied on dashboard * fix tests * fix bug user status leak * fix typo * return after render
* Implement "conversation lock" for issue comments (#5073)Lanre Adelowo2019-02-185-0/+79
|
* Allow to set organization visibility (public, internal, private) (#1763)Rémy Boulanouar2019-02-185-13/+194
|
* Fix deadlock in webhook PullRequest (#6102)zeripath2019-02-173-13/+15
| | | Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix panic: template: repo/issue/list:210: unexpected "=" in operand (#6041)Zsombor2019-02-131-0/+19
|
* Refactor editor upload, update and delete to use git plumbing and add LFS ↵zeripath2019-02-124-572/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add option to close issues via commit on a non master branch (#5992)Lanre Adelowo2019-02-108-17/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* disable git fsck for mirrored repos by default (#6018)Lanre Adelowo2019-02-091-1/+1
|
* Feature - #3031 - search for org repos (#5986)Richard Mahn2019-02-081-0/+9
|
* Add API to list tags (#5850)Lunny Xiao2019-02-071-0/+24
| | | | | | | | | | | | | | * Add API to list tags * update dependency gitea sdk vendor * fix swagger generation * fix swagger * add tests * update code.gitea.io/git vendor
* Fix empty ssh key importing in ldap (#5984)zeripath2019-02-061-3/+6
|
* 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>
* Pull request conflict files detection (#5951)Lunny Xiao2019-02-051-5/+30
| | | | | | | | | | * add conflict detection * test pull request conflict files * fix detection files number * fix comments
* Automatically clear stopwatch on merging a PR (#4327)Lanre Adelowo2019-02-051-2/+14
| | | | | | | | | | | | | | | | | | | | * Don't display buttons if there are no notices * clear stopwatch on merging a PR * remove redundant gt check * use ctx.Flash as per @bkcsoft comment * stop timer on closing issues/PRs too * updated translation as per review * redirect to login page after successfully activating account * remove unrelated changes * stop timer for issues that are closed via commits too..Not just the 'close' UI button
* Add label names as filter in issue search api (#5946)Lanre Adelowo2019-02-042-1/+38
|
* Fix ssh deploy and user key constraints (#1357) (#5939)zeripath2019-02-032-35/+73
| | | | | | | | | | | | | | | | 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
* show user who created the repository instead of the organization in action ↵Lanre Adelowo2019-02-041-2/+2
| | | | feed (#5948)
* handle milestone events for issues and PR (#5947)Lanre Adelowo2019-02-031-0/+8
|
* Remove all CommitStatus when a repo is deleted (#5940)John Olheiser2019-02-021-0/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fix log output (#5938)Sergey Romanov2019-02-021-1/+1
|
* support reviewing on a deleted file path (#5880)Lanre Adelowo2019-02-011-2/+3
|
* Only allow local login if password is non-empty (#5906)zeripath2019-01-301-1/+1
|
* Fix go-get URL generation (#5905)Lauris BH2019-01-301-1/+2
|