1408 Commits (d330a23ce1d20d684b4ee6905cb295fb5b39e398)

Author SHA1 Message Date
Sandro Santilli f73e734411 Run "make fmt" with go-1.6 (#1333) 7 years ago
caiwp dbabc35e71 Delete the useless code (#1335) 7 years ago
Lunny Xiao 8bcb643a03 remove empty file (#1326) 7 years ago
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. (#1297) 7 years ago
Sandro Santilli 71d16f69ff Login via OpenID-2.0 (#618) 7 years ago
Lunny Xiao 3cf0e513e6 fix wrong log when push to a new branch (#1220) 7 years ago
Ethan Koenig 17f403fbcd Fix nil-dereference bug 7 years ago
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ (#1248) 7 years ago
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment (#1247) 7 years ago
Andrey Nering d2b2881306 Fix Git hooks not being executed on Windows when running as a service (#1149)
Closes #1139
7 years ago
Bo-Yi Wu 0afab87631 refactor: remove redundant slash. (#1109) 7 years ago
Bo-Yi Wu 28a5bc313a fix: gofmt errors. (#1106) 7 years ago
Schwobaland 2f7dc28b22 add ProxyFromEnvironment if none set (#1096) 7 years ago
Jonas f3bf409082 Log config pretty printer (#1097)
Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>
7 years ago
Lunny Xiao 0380ce269f add back the default setting values and fix #739 (#1093) 7 years ago
Thomas Boerger db6777d369 Fixed custom templates for static builds (#1087) 7 years ago
Lunny Xiao c2eef171ff fix some typos (#1082) 7 years ago
Jonas a201977590 Fix for #828: Embed build tags (#1051)
* Fix for #828
Add build tags to ldflags and print in version output

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Reworked formatBuiltWith function

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Add tags to version information in admin panel

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Added new variable for use on admin page.

Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>

* Fixed incorrect indentation
7 years ago
Andrey Nering f552b0a207 Remove test that touch network 7 years ago
Andrew Boyarshin 0602a44b27 Fix URL handling in the whole markdown module, improve test coverage (#1027)
Amended with string to bool change in API SDK.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
7 years ago
puffybsd 8de8e11487 Fixes 1019, install page SMTP user is required to (#1020)
to be an email address.

Signed-off-by: P.B. <puffybsd@yahoo.com>
7 years ago
Lunny Xiao d6748284bd fix panic when push but the only log mode console is disabled by serv and update commands (#1007) 7 years ago
Willem van Dreumel 01d957677f Oauth2 consumer (#679)
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)

* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)

* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
7 years ago
Denis Denisov fd941db246 Protected branches system (#339)
* Protected branches system

* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
  - Admin does not restrict
  - Owner not to limit
  - To write permission restrictions

* reformat tmpl

* finished the UI and add/delete protected branch response

* remove unused comment

* indent all the template files and remove ru translations since we use crowdin

* fix the push bug
7 years ago
Lunny Xiao 70ae6d197b disable console output xorm log on ssh (#993) 7 years ago
Lunny Xiao 04fdeb9d8d Make Xorm log configurable (#174)
* make xorm log configable

* bug fixed for other sub commands except web

* rebase and fix xorm log

* bug fix for TrimSpace
7 years ago
Unknwon 134f3e6e09 Security: prevent XSS attach on wiki page
Reported by Miguel Ángel Jimeno.
7 years ago
Lunny Xiao cf47532ebc fix ssh domain default value to domain (#930) 7 years ago
Bo-Yi Wu d67b278a0d feat: Able to disable non-admin to create new organization (#927) 7 years ago
Andrew Boyarshin dc8248f8a4 Markdown rendering overhaul (#186)
* Markdown rendering overhaul

Cleaned up and squashed commits into single one.

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>

* Fix markdown API, add markdown module and API tests, improve code coverage

Signed-off-by: Andrew Boyarshin <boyarshinand@gmail.com>
7 years ago
Bo-Yi Wu 5cc275b1de feat: add git version on admin panel. (#921) 7 years ago
Andrew a36a8f4d72 Add missing copyright header to status table test (#902) 7 years ago
Andrew 42835c7f82 Implement archive cleanup (#885)
* Implement archive cleanup

Fixes #769

Signed-off-by: Andrew <write@imaginarycode.com>

* Make sure to close the directory file

* Resolve issues noted by @strk

* edit cheatsheet app.ini [ci skip]

* oops [ci skip]
7 years ago
Andrew 1da7dd3da9 Improve status table implementation (#879)
* Remove superfluous defer calls

* Improve status table implementation as well

This would probably only help with large, high-traffic installs
7 years ago
Ethan Koenig d2329e1c26 Use assert in legacy unit tests (#867) 7 years ago
Ethan Koenig 027591a3a5 Redirects for renamed repos (#807)
* Redirects for renamed repos

* Remove unused phrase from locales
8 years ago
Ethan Koenig e86d935175 Avoid duplicate queries in auth (#827)
Avoid identical making calls to GetUserByID(..) in SignedInUser(..)
8 years ago
Matthias Loibl 17c5e12e6e Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060 (#801)
* Add ENABLE_PPROF to app.ini and start pprof if true on localhost:6060

* Add comment for golint to blank pprof import
8 years ago
Lunny Xiao 8a421b1fd7 Add units concept for modulable functions of a repository (#742)
* Add units concept for modulable functions of a repository

* remove unused comment codes & fix lints and tests

* remove unused comment codes

* use struct config instead of map

* fix lint

* rm wrong files

* fix tests
8 years ago
ʿAhed ʿid 49fa03bf42 Allow using custom time format (#798)
* Allow using custom time format

I need to use custom time format in `conf/app.ini' like 

    FORMAT = 2006-01-02 15:04:05

so that Gitea will display '2017-01-30 08:41:49'
check this answer for more constants to format date  <http://stackoverflow.com/a/20234207/2570425> 

PS: First GO commit

* Refactor and validate TimeFormat (must have 2006, 01, 02, 15, 04 and 05)
8 years ago
Gabriel Jackson bf6f61cc69 Cleanup log messaging
This change corrects a few logging issues:

 * Standardized formatting errors with '%v'.
 * Standardized failure warning word usage.
 * Corrected an instance of using the standard log library when
   the gitea log library should be used instead.
8 years ago
Ethan Koenig 73d05a51e3 Remove unneeded database loads (#814)
Remove unnecessary calls to repo.GetOwner() in context handlers
8 years ago
Thomas Boerger 78535fb08e Allow custom public files (#782)
* Allow custom public files

* Gofmt code, lots of places not related to this pr
8 years ago
Bo-Yi Wu 25663b5816 refactor: Remove unnecessary type conversions (#772) 8 years ago
Andrey Nering e7c3be5f2f Merge pull request #736 from andreynering/fix-windows-ssh
Fix SSH server on Windows when running as service
8 years ago
Bwko 634ac9c5af Update Website binding MaxSize to 255 (#722) 8 years ago
Ethan Koenig 833f8b94c2 Search bar for issues/pulls (#530) 8 years ago
Andrey Nering bcee9b76dd Fix lint 8 years ago
Andrey Nering fda4476061 Fix SSH server on Windows when running as service
Closes #680
8 years ago
Andrey Nering 44d4863ecf Merge commit 'af636848622c8ad27cace63be5f9dd9aaa565502' as 'modules/minwinsvc' 8 years ago