1797 Commits
Author SHA1 Message Date
Lauris BHandGitHub 13013e90f3 Fix PR, milestone and label functionality if issue unit is disabled (#2710) (#2714)
* Fix PR, milestone and label functionality if issue unit is disabled or not assigned to user

* Fix multi-actions in PR page

* Change error message

* Fix comment update and delete functionality in PR
2017-10-16 16:59:01 +03:00
Lauris BHandGitHub fb80265b52 Fix so that user can still fork his own repository to owned organizations (#2699) (#2707)
* Fix so that user can still fork his own repository to his organizations

* Fix to only use owned organizations

* Add integration test for forking own repository to owned organization
2017-10-15 19:40:33 +03:00
David SchneiderbauerandLauris BH 74399f333f Backport of migration fixes (#2604) (#2677)
* Rewrite migrations to not depend on future code changes (#2604)

* v38 migration used an outdated version of RepoUnit model (#2602)

* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

* Fix migration from Gogs

* Refactor code

* add error check

* Additiomal fixes for migrations

* Add back nil check

* replace deprecated .Id with .ID

Signed-off-by: David Schneiderbauer <[email protected]>

* change string map to interface map

Signed-off-by: David Schneiderbauer <[email protected]>
2017-10-09 16:08:22 +03:00
Lauris BHandGitHub 73ad7d2ef3 Fixes 500 error on dashboard when using MSSQL (#2504) (#2662)
MSSQL rejects the query:
  SELECT "repository"."id" FROM "repository"
  INNER JOIN "team_repo" ON "team_repo".repo_id="repository".id AND
  "repository".is_mirror=1
  WHERE (
    ("repository".owner_id=2 AND "repository".is_private=0)
        OR team_repo.team_id IN (1)
        )
        GROUP BY "repository".id ORDER BY updated_unix DESC

when the order by term (updated_unix) is not included in the group by
term.
2017-10-05 21:08:40 +03:00
David SchneiderbauerandLauris BH e38e502e20 Fix deletion of unprotected branches (#2630)
* fix deletion of unprotected branches

* fmt fix

* changed internal protected branch api

* fix lint error

Signed-off-by: David Schneiderbauer <[email protected]>
2017-10-02 23:23:41 +03:00
David SchneiderbauerandLauris BH 3cc5b11b0d Backport of 2611 / Fix doubled issue tab introduced in migration v16 (#2622)
Signed-off-by: David Schneiderbauer <[email protected]>
2017-10-01 09:18:49 +03:00
David SchneiderbauerandLauris BH 4c9bf91a2c v38 migration used an outdated version of RepoUnit model (#2602)
* change repoUnit model in migration

* fix v16 migration repo_unit table

* fix lint error

* move type definition inside function

Signed-off-by: David Schneiderbauer <[email protected]>
2017-09-25 19:53:55 +03:00
Lauris BHandGitHub e232c49b10 Sync releases table with tags on push and for mirrors (#2459) (#2554)
* Sync releases table with tags on push and for mirrors

* Code style fixes

* Fix api to return only releases

* Optimize release creation and update
Minimize posibility of race conditions

* Fix release lower tag name updating

* handle tag reference update by addionally comparing commit id
2017-09-21 01:08:22 +03:00
Lauris BHandGitHub 25e71ad41e Fix adding branch as protected to not allow pushing to it (#2556)
* Fix adding branch as protected to not allow pushing to it

* Fix can_push value to false in protected_branch (#2560)

* Fix integration test
2017-09-20 20:14:09 +03:00
Ethan KoenigandLauris BH f014e42a06 Backport: Fix lint, fmt and integration testing errors (#2553)
* Fix lint errors

* Fix fmt errors (#2544)

* Hotfix for integration testing (#2473)

* Hotfix for integration testing
2017-09-20 19:30:20 +03:00
Jonas FranzandKim "BKC" Carlbäcker 91788e0200 Restricting access to fork functioanlity to users with Code access (#2542)
Signed-off-by: Jonas Franz <[email protected]>
2017-09-19 01:12:29 +02:00
Lauris BHandLunny Xiao 002fa73460 Fix migration from pre-v15 to 1.2.0 (#2460) (#2465) 2017-09-05 21:03:30 +08:00
Lauris BHandLunny Xiao 0c910afe11 Fix releases to be counted from database not tags (#2389) (#2424) 2017-08-30 09:31:32 +08:00
Lunny XiaoandKim "BKC" Carlbäcker 1cbe502cc2 fix duplicated feed (#2370) 2017-08-28 19:16:25 +02:00
Lunny XiaoandGitHub 0938a2dca3 Fix missing collabrative repos (#2367) (#2382)
* fix missing collabrative repos

* fix bug of collabrative

* fix SQL quotes
2017-08-25 10:25:37 +08:00
Lunny XiaoandLauris BH 64b7068846 Add more test for login links and fix a bug on action retrieve (#2361)
* add more test for login links and fix a bug on action retrieve
2017-08-23 12:53:35 +03:00
Ethan KoenigandLauris BH fd6e91077a Fix SQL condition bug in GetFeeds(..) (#2360) 2017-08-23 08:51:58 +03:00
BwkoandLunny Xiao 1a5fe4326f Add collaborative repositories to the dashboard (#2205)
* Add collaborative repositories to the dashboard

Remove some unused code from the Dashboard func

* fix some bug and some refactor

* fix tests
2017-08-23 09:30:54 +08:00
Lunny XiaoandLauris BH 2c6a0fdca8 update latest xorm version to vendor (#2353) 2017-08-22 14:39:52 +03:00
Ethan KoenigandLunny Xiao 7907786040 Trigger sync webhooks on UI commit (#2302)
* Trigger sync webhooks on UI commit

* Also fix UI upload/delete
2017-08-17 15:22:08 +08:00
Lunny XiaoandGitHub f960e19c59 Only update needed columns when update user (#2296)
* only update needed columns when update user

* fix missing update_unix column
2017-08-12 22:18:44 +08:00
Lunny XiaoandGitHub 921d90fd8b fix 500 error when view an issue which's milestone deleted (#2297) 2017-08-12 10:15:30 +08:00
GandLunny Xiao 34df9deff1 Convert xorm literal queries to method calls (#2253) 2017-08-04 12:42:51 +08:00
Ethan KoenigandLunny Xiao 7e0654bd9e Fix counts on issues dashboard (#2215)
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
2017-08-03 13:09:16 +08:00
Ethan KoenigandLauris BH f29458bd3a EnableUnit() -> UnitEnabled() (#2242) 2017-08-02 11:46:54 +03:00
GandLunny Xiao 66e8262530 Replace calls to xorm UseBool with Where (#2237) 2017-08-01 13:47:31 +08:00
Ethan KoenigandLauris BH fd45a032a7 Fix bare-repo bugs (#2199)
* Fix bare-repo bugs

* Integration tests

* Unused import
2017-07-27 12:23:38 +03:00
Ethan KoenigandLunny Xiao a27863b6d1 Fix issue updated_unix bug (#2204) 2017-07-27 09:20:38 +08:00
Ethan KoenigandLunny Xiao 5f37944dff Fix unclosed session bug (#2214) 2017-07-26 17:30:47 +08:00
Lauris BHandLunny Xiao 1d032f5220 Fix compiling without sqlite and gcc (#2177) 2017-07-26 15:27:30 +08:00
Ethan KoenigandLunny Xiao 48898e5d0b Fix PR nil-dereference bug (#2195)
* Fix PR nil-dereference bug

* Revert to original error format
2017-07-26 15:16:45 +08:00
Lauris BHandLunny Xiao dde0052ca2 Fix key usage time update if the key is used in parallel for multiple operations (#2185) 2017-07-20 11:15:10 +08:00
Lauris BHandLunny Xiao f33e6ae09e Remove unit types commits and settings (#2161)
* Remove unit types commits and settings

* Can not limit units in administrator teams

* Limit changing units only to teams with read and write access mode

* Small code optimization
2017-07-17 10:04:43 +08:00
Lauris BHandBo-Yi Wu b639fa1648 Ignore invalid issue numbers in commit messages. Fixes #2022 (#2150) 2017-07-12 22:35:47 -05:00
Ethan KoenigandLauris BH 858324c21a Fix username rendering bug (#2122)
* Fix username rendering bug

* XSS integration test

* Migration to unescape user full names
2017-07-12 17:58:52 +03:00
Antoine GIRARDandLunny Xiao 30787e48f2 Improve org error handling (#2117)
* Improve ErrOrgNotExist type
Return new error type
Use good error check
Use new method to check error
Update tests

* Fix unchanged method name report
2017-07-06 21:30:19 +08:00
Ethan KoenigandLunny Xiao a52cd59727 Fix unchecked error bug (#2110) 2017-07-04 09:30:41 +08:00
Lauris BHandLunny Xiao f189ccd2d6 Fix git hooks update to receive required arguments. Fixes #2090 (#2095)
* Changed migration calling so that migrations can use models package
2017-07-02 21:50:57 +08:00
Ethan KoenigandLauris BH eae9154811 Fix SQL bug in models.PullRequests 2017-07-01 14:08:43 +03:00
Lauris BHandGitHub 12cb6cd3c9 Merge pull request #2087 from Bwko/fix_error_exit
Fix exit status 1 not handled @ getMergeCommit (#2087)
2017-06-30 15:46:49 +03:00
Bwko b36849dc1f Fix exit status 1 not handled @ getMergeCommit 2017-06-30 12:35:26 +02:00
Andrey NeringandGitHub 935b40fd8e Merge pull request #2083 from ethantkoenig/check_err/org_avatar
Don't ignore gravatar error
2017-06-29 21:30:05 -03:00
Ethan Koenig 05e3726415 Use default avatar on error 2017-06-29 12:10:33 -04:00
Lauris BHandLunny Xiao 783b1967e2 Fix release display and correct paging (#2080) 2017-06-29 23:11:38 +08:00
Lunny XiaoandKim "BKC" Carlbäcker 33f3165296 remove unnecessary blank lines and wrong error log 2017-06-28 19:00:08 +02:00
iszlaandLunny Xiao 3f9016430f Pagination on releases page (#2035)
* Added count to GetReleasesByRepoID so pagination will work

* Separated it out to a new function, can then also leave the API part unaffected

* Remove extra whitespace added in untouched function

* Added comment and corrected name in error handler

* Account for if the user is owner or not in the count

* Also check if repo is draft

* revert back to the correct count in the ReleasesToDisplay loop

* Fixed lint error regarding else with return statement

* Use Cond struct instead of string, corrected name in error handler

* Removed unused return variable names
2017-06-28 22:47:00 +08:00
Lauris BHandLunny Xiao 32fc44aa83 Make time diff translatable (#2057) 2017-06-28 13:43:28 +08:00
Dan Magnus LindvallandLunny Xiao 79daf31058 Setting to disable authorized_keys backup (#1856)
* Add setting to disable authorized_keys backup when rewriting public keys

Signed-off-by: Magnus Lindvall <[email protected]>

* Update default value to comply with documentation

Signed-off-by: Magnus Lindvall <[email protected]>

* Use tmp-file instead of bak-file for saving manually added keys.

Signed-off-by: Magnus Lindvall <[email protected]>

* Change casing

Signed-off-by: Magnus Lindvall <[email protected]>

* Change casing and build bakpath with sprintf only

Signed-off-by: Magnus Lindvall <[email protected]>

* Only close file once

Signed-off-by: Magnus Lindvall <[email protected]>

* Do not modify calcFingerprint

Signed-off-by: Magnus Lindvall <[email protected]>

* Fix casing

Signed-off-by: Magnus Lindvall <[email protected]>

* Change style from disable to enable

Signed-off-by: Magnus Lindvall <[email protected]>

* Change name, just SSH_BACKUP_AUTHORIZED_KEYS

Signed-off-by: Magnus Lindvall <[email protected]>

* Do not check for directory existence if backup is disabled

Signed-off-by: Magnus Lindvall <[email protected]>
2017-06-28 09:35:35 +08:00
Ethan KoenigandLunny Xiao 80707c4736 Fix default ghost assignee bug (#2069) 2017-06-28 09:27:12 +08:00
Jonas FranzandKim "BKC" Carlbäcker 441986a473 Fix "Dashboard shows deleted comments" (#1995) 2017-06-25 20:20:29 +02:00