Commit Graph
2012 Commits
Author SHA1 Message Date
Lanre AdelowoandLunny Xiao 3fbcdd9e25 Make sure to reset commit count in the cache on mirror syncing (#4720) (#4770)
* Make sure to reset commit count in the cache on mirror syncing

* reset count of commits in all branches
2018-08-23 22:23:21 +08:00
SagePtrandtechknowlogick 12c04a85f2 Fix failure on creating pull request with assignees (#4419) (#4727) 2018-08-16 13:46:06 -04:00
Lunny XiaoandLauris BH eb8c611b1d Site admin could create repos even MAX_CREATION_LIMIT=0 (#4645) (#4650)
* site admin could create repos even MAX_CREATION_LIMIT=0

* Optimize if structure
2018-08-09 06:31:57 +03:00
SagePtrandLauris BH 15a403bf97 Push whitelist now doesn't apply to branch deletion (#4601) (#4640) 2018-08-08 11:19:13 +03:00
Lunny Xiaoandtechknowlogick 099028681e fix bugs when too many IN variables (#4594) (#4597) 2018-08-02 14:48:39 -04:00
SagePtrandLauris BH 5a7830e0e8 Fix incorrect MergeWhitelistTeamIDs check in CanUserMerge function (#4519) (#4526) 2018-07-27 22:11:53 +03:00
SagePtrandtechknowlogick dae065ea68 Fix out-of-transaction query in removeOrgUser (#4521) (#4524) 2018-07-27 08:57:49 -04:00
Lauris BHandtechknowlogick 3e191935c8 Fix column droping for MSSQL that need new transaction for that (#4440) (#4484) 2018-07-20 15:27:30 -04:00
Lauris BHandGitHub 8a639ade58 Update xorm to latest version and fix correct user table referencing in sql (#4473) (#4483) 2018-07-20 21:48:15 +03:00
Lauris BHandJonas Franz f096e69e0a Add default merge options when adding new repository (#4369) (#4373) 2018-07-05 16:12:09 +02:00
Lunny XiaoandDavid Schneiderbauer 768b41adba fix repository last updated time update when delete a user who watched the repo (#4363) (#4371) 2018-07-05 08:46:13 +02:00
Kim "BKC" CarlbäckerandLauris BH cbee921c28 Limit uploaded avatar image-size to 4096x3072 by default (#4353) 2018-07-03 06:56:32 +03:00
Alexey Terentyevandtechknowlogick 91ff87c0e5 Fixed violation of the unique constraint for v68 migration (#4297) 2018-06-27 01:23:10 -04:00
David Schneiderbauerandtechknowlogick 0b3ea42847 hide issues from org private repos w/o team assignment (#4034) 2018-06-21 12:00:13 -04:00
Alexey TerentyevandLunny Xiao 46d19c4676 Fix topics addition (Another solution) (#4031) (#4258)
* Added topics validation, fixed repo topics duplication (#4031)

Signed-off-by: Alexey Terentyev <[email protected]>

* Added tests

Signed-off-by: Alexey Terentyev <[email protected]>

* Fixed fmt

Signed-off-by: Alexey Terentyev <[email protected]>

* Added comments to exported functions

Signed-off-by: Alexey Terentyev <[email protected]>

* Deleted RemoveDuplicateTopics function

Signed-off-by: Alexey Terentyev <[email protected]>

* Fixed messages

Signed-off-by: Alexey Terentyev <[email protected]>

* Added migration

Signed-off-by: Alexey Terentyev <[email protected]>

* fmt migration file

Signed-off-by: Alexey Terentyev <[email protected]>

* fixed lint

Signed-off-by: Alexey Terentyev <[email protected]>

* Added Copyright

Signed-off-by: Alexey Terentyev <[email protected]>

* Added query solution for duplicates

Signed-off-by: Alexey Terentyev <[email protected]>

* Fixed migration query

Signed-off-by: Alexey Terentyev <[email protected]>

* Changed RegExp. Fixed migration

Signed-off-by: Alexey Terentyev <[email protected]>

* fmt migration file

Signed-off-by: Alexey Terentyev <[email protected]>

* Fixed test for changed regexp

Signed-off-by: Alexey Terentyev <[email protected]>

* Removed validation log messages

Signed-off-by: Alexey Terentyev <[email protected]>

* Renamed migration file

Signed-off-by: Alexey Terentyev <[email protected]>

* Renamed validate function

Signed-off-by: Alexey Terentyev <[email protected]>
2018-06-21 17:09:46 +08:00
techknowlogickandLauris BH d84da8fe65 Change parsing of postgresql settings (#4275)
* Change parsing of postgresql settings

Fix #4200

* Add copyright

* update postgresql connection string

* add tests
2018-06-20 08:06:01 +03:00
David Schneiderbauerandtechknowlogick a93f13849c Fix not removed watches on unallowed repositories (#4201) 2018-06-19 15:44:33 -04:00
Lauris BHandtechknowlogick 2b8c0bb5e2 Delete reactions added to issues and comments when deleting repository (#4232) 2018-06-12 13:02:51 -04:00
Lunny Xiaoandtechknowlogick 406031d3cc fix bug when deleting a release (#4207) 2018-06-12 12:44:17 -04:00
Lunny Xiaoandtechknowlogick da898d4066 fix delete comment bug (#4216) 2018-06-11 18:54:30 -04:00
Christopher Medlinandtechknowlogick b5f61f1d15 Improve logging for e-mail and OpenID already in use errors (#4174) 2018-06-08 14:09:10 -04:00
Magnus LindvallandLauris BH cdb9478774 LDAP Public SSH Keys synchronization (#1844)
* Add LDAP Key Synchronization feature

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

* Add migration: add login source id column for public_key table

* Only update keys if needed

* Add function to only list pubkey synchronized from ldap

* Only list pub ssh keys synchronized from ldap. Do not sort strings as ExistsInSlice does it.

* Only get keys belonging to current login source id

* Set default login source id to 0

* Some minor cleanup. Add integration tests (updete dep testify)
2018-05-24 07:59:02 +03:00
Alexey TerentyevandLunny Xiao b908ac9fab Added repository search ordered by stars or forks. Forks column in admin repo list. (#3969)
* Added repository search order by stars or forks.
Added Forks column to admin repository list.

Signed-off-by: Alexey Terentyev <[email protected]>

* Renamed search repo template

Signed-off-by: Alexey Terentyev <[email protected]>
2018-05-24 09:03:42 +08:00
Lunny XiaoandGitHub 4ec8551490 fix webhook bug of response info is not displayed in UI (#4000) 2018-05-23 14:12:02 +08:00
奶爸andLunny Xiao d94472e89b fix #4003 (#4004)
Webhook and hook_task not cleaned up when delete repository
2018-05-21 21:30:30 +08:00
Lunny XiaoandGitHub 6bdc556b7f Fix some webhooks bugs (#3981)
* fix some webhooks bugs

* update vendor

Signed-off-by: Bo-Yi Wu <[email protected]>

* fix test

* fix clearlabels

* fix pullrequest webhook bug fix #3492

* update release webhook description

* remove unused code

* fix push webhook in pull request

* small changes
2018-05-21 10:28:29 +08:00
Jonas FranzandLauris BH 951309f76a Add support for FIDO U2F (#3971)
* Add support for U2F

Signed-off-by: Jonas Franz <[email protected]>

* Add vendor library
Add missing translations

Signed-off-by: Jonas Franz <[email protected]>

* Minor improvements

Signed-off-by: Jonas Franz <[email protected]>

* Add U2F support for Firefox, Chrome (Android) by introducing a custom JS library
Add U2F error handling

Signed-off-by: Jonas Franz <[email protected]>

* Add U2F login page to OAuth

Signed-off-by: Jonas Franz <[email protected]>

* Move U2F user settings to a separate file

Signed-off-by: Jonas Franz <[email protected]>

* Add unit tests for u2f model
Renamed u2f table name

Signed-off-by: Jonas Franz <[email protected]>

* Fix problems caused by refactoring

Signed-off-by: Jonas Franz <[email protected]>

* Add U2F documentation

Signed-off-by: Jonas Franz <[email protected]>

* Remove not needed console.log-s

Signed-off-by: Jonas Franz <[email protected]>

* Add default values to app.ini.sample
Add FIDO U2F to comparison

Signed-off-by: Jonas Franz <[email protected]>
2018-05-19 17:12:37 +03:00
Lunny XiaoandGitHub 24941a1046 Add more webhooks support and refactor webhook templates directory (#3929)
* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* add more webhook support

* move hooks templates to standalone dir and add more webhooks ui

* fix tests

* update vendor checksum

* update vendor

Signed-off-by: Bo-Yi Wu <[email protected]>

* load attributes when created release

* update comparsion doc
2018-05-16 22:01:55 +08:00
Lauris BHandLunny Xiao ff3971b830 Add LDAP integration tests (#3897)
* Add LDAP service for tests

* Add LDAP login source and test user sign-in

* Add checks to test if user data is correct

* Add LDAP user sync test

* Add failed user sign-in test
2018-05-11 15:55:32 +08:00
Lauris BHandLunny Xiao 382e7276b8 Fix multiple asssingee table migration (#3931) 2018-05-10 09:18:01 +08:00
kolaenteandLauris BH 95f2e2b57b Multiple assignees (#3705) 2018-05-09 19:29:04 +03:00
Travis ParkerandLauris BH 73370b8cf7 consistent IsOverdue field name capitalization (#3909)
Milestone.IsOverDue vs Issue.IsOverdue, the former was also causing the
milestone list page template to fail to render if any milestones have a
due date assigned.

Signed-off-by: Travis J Parker <[email protected]>
2018-05-07 12:50:27 +03:00
kolaenteandLunny Xiao 1fdf560678 Added user language setting (#3875)
* Added user language setting

* Added translation string for setting

* Fixed import order + typo

* improved checking if the user has a language saved in the db

* The current saved language is now set a default inside the dropdown

* fmt

* When a user signs in and doesn't have a language saved, the current browser language is saved

* updated gitea-sdk

* Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language

# Conflicts:
#	models/migrations/migrations.go
#	models/migrations/v62.go

* Made tests work again

* trigger CI

* trigger CI

* fmt

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* When loggin in, only the language col gets updated instead of everything
2018-05-05 08:28:30 +08:00
Lauris BHandGitHub 1e1ece8f3d Do not allow to reuse TOTP passcode (#3878) 2018-05-02 18:02:02 +03:00
Bo-Yi WuandLunny Xiao c58e1e437b test: reduce testing time. (#3885) 2018-05-02 21:56:19 +08:00
Lauris BHandGitHub 9495429982 Add "error" as reserved username (#3882) 2018-05-02 11:06:31 +03:00
Lauris BHandGitHub 5ffdf9388b Fix to use only needed columns from tables to get repository git paths (#3870) 2018-05-02 09:10:19 +03:00
kolaenteandLauris BH 1a97030017 Issue due date (#3794)
* Started adding deadline to ui

* Implemented basic issue due date managing

* Improved UI for due date managing

* Added at least write access to the repo in order to modify issue due dates

* Ui improvements

* Added issue comments creation when adding/modifying/removing a due date

* Show due date in issue list

* Added api support for issue due dates

* Fixed lint suggestions

* Added deadline to sdk

* Updated css

* Added support for adding/modifiying deadlines for pull requests via api

* Fixed comments not created when updating or removing a deadline

* update sdk (will do properly once go-gitea/go-sdk#103 is merged)

* enhanced updateIssueDeadline

* Removed unnessecary Issue.DeadlineString

* UI improvements

* Small improvments to comment creation
+ ui & validation improvements

* Check if an issue is overdue is now a seperate function

* Updated go-sdk with govendor as it was merged

* Simplified isOverdue method

* removed unessecary deadline to 0 set

* Update swagger definitions

* Added missing return

* Added an explanary comment

* Improved updateIssueDeadline method so it'll only update `deadline_unix`

* Small changes and improvements
* no need to explicitly load the issue when updating a deadline, just use whats already there
* small optimisations

* Added check if a deadline was modified before updating it

* Moved comment creating logic into its own function

* Code cleanup for creating deadline comment

* locale improvement

* When modifying a deadline, the old deadline is saved with the comment

* small improvments to xorm session handling when updating an issue deadline
+ style nitpicks

* style nitpicks

* Moved checking for if the user has write acces to middleware
2018-05-01 22:05:28 +03:00
Tris ForsterandLauris BH 85d14cc229 Symlink icons (#1416) (#3826)
* Updated vendor code for code.gitea.io/git

* Display symlinks correctly for files and directories

* Added symlink tests

* Applied silverwinds stylesheet patch

Signed-off-by: Tris Forster <[email protected]>
2018-05-01 10:04:36 +03:00
Lauris BHandBo-Yi Wu 181b3a8f09 Fix path cleanup in multiple places (#3871) 2018-05-01 09:46:04 +08:00
Ethan KoenigandLunny Xiao 7ea4bfc561 API endpoint for testing webhook (#3550)
* API endpoint for testing webhook

* Empty commit to rerun CI
2018-04-29 14:21:33 +08:00
Lauris BHandGitHub 5a62eb30df Store OAuth2 session data in database (#3660)
* Store OAuth2 session data in database

* Rename table to `oauth2_session` and do not skip xormstorage initialization error
2018-04-29 09:09:24 +03:00
Jonas FranzandLunny Xiao 8d5f58d834 Shows total tracked time in issue and milestone list (#3341)
* Show total tracked time in issue and milestone list
Show total tracked time at issue page

Signed-off-by: Jonas Franz <[email protected]>

* Optimizing TotalTimes by using SumInt

Signed-off-by: Jonas Franz <[email protected]>

* Fixing wrong total times for milestones caused by a missing JOIN
Adding unit tests for total times

Signed-off-by: Jonas Franz <[email protected]>

* Logging error instead of ignoring it

Signed-off-by: Jonas Franz <[email protected]>

* Correcting spelling mistakes

Signed-off-by: Jonas Franz <[email protected]>

* Change error message to a short version

Signed-off-by: Jonas Franz <[email protected]>

* Add error handling to TotalTimes
Add variable for totalTimes

Signed-off-by: Jonas Franz <[email protected]>

* Introduce TotalTrackedTimes as variable of issue
Load TotalTrackedTimes by loading attributes of IssueList
Load TotalTrackedTimes by loading attributes of single issue
Add Sec2Time as helper to use it in templates

Signed-off-by: Jonas Franz <[email protected]>

* Fixed test + gofmt

Signed-off-by: Jonas Franz <[email protected]>

* Load TotalTrackedTimes via MilestoneList instead of single requests

Signed-off-by: Jonas Franz <[email protected]>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <[email protected]>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <[email protected]>

* Fix test

Signed-off-by: Jonas Franz <[email protected]>

* Change comment from SQL query to description

Signed-off-by: Jonas Franz <[email protected]>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <[email protected]>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <[email protected]>

* Check if timetracker is enabled

Signed-off-by: Jonas Franz <[email protected]>

* Fix test by enabling timetracking

Signed-off-by: Jonas Franz <[email protected]>
2018-04-29 13:58:47 +08:00
kolaenteandLunny Xiao fd8d6405c8 Fix only updated_unix when adding a comment (#3855) 2018-04-29 12:48:14 +08:00
Morgan BazalgetteandLunny Xiao 320c9817bc Don't force due date to current time (#3830)
Fixes #3827
2018-04-23 13:55:03 +08:00
Lunny XiaoandGitHub bec69f702b Add topic support (#3711)
* add topic models and unit tests

* fix comments

* fix comment

* add the UI to show or add topics for a repo

* show topics on repositories list

* fix test

* don't show manage topics link when no permission

* use green basic as topic label

* fix topic label color

* remove trace content

* remove debug function
2018-04-11 10:51:44 +08:00
Michael KuhnandBo-Yi Wu f321980a32 Fix typo in deleteUser (#3781)
num_watches was used where num_stars should have been used.
2018-04-10 20:39:01 +08:00
BwkoandLunny Xiao 8ee45eb614 Add EnableTimetracking option to app settings (#3719) 2018-04-09 23:15:32 +08:00
Evan SherwoodandLunny Xiao 6b6c414bc3 Enhance healthcheck for database connectivity (#3754)
Modify the call to ping the database to fail gracefully if the
database has not yet been configured by the end user, such as
after a clean install. This allows /healthcheck to return a 200
with a modified status message instead of causing a PANIC.

Signed-off-by: Evan Sherwood <[email protected]>
2018-04-04 17:34:27 +08:00
Jonas FranzandBo-Yi Wu 3e06490d38 Add Size column to attachment (#3734)
* Add size column to attachment
Migrate attachments by calculating file sizes

Signed-off-by: Jonas Franz <[email protected]>

* Calculate attachment size on creation

Signed-off-by: Jonas Franz <[email protected]>

* Log error instead of returning error

Signed-off-by: Jonas Franz <[email protected]>
2018-03-31 09:10:44 +08:00