1440 Commits (9c66d1d9ea102b50baefdaf1617a42bb741a4c3a)

Author SHA1 Message Date
Bo-Yi Wu 1e40c2e579 fix: #1757 fix set MAX_CREATION_LIMIT as zero. (#1762)
* fix: #1757 fix set MAX_CREATION_LIMIT as zero.

* fix: missing default value
7 years ago
Andrey Nering be5323a05f Update HighlightJS and fix YAML files highlighting (#1764)
* Update HighlightJS to 9.11.0

* Fix YAML files highlighting
7 years ago
Lunny Xiao 6362462da8
fix admin lost permission caused by #947 7 years ago
Lunny Xiao fd6034aaf2 Add units to team (#947)
* add units to team

* fix lint

* finish team setting backend

* finished permission controll on routes

* fix import blank line

* add unit check on ssh/http pull and push and fix test failed

* fix fixtures data

* remove unused code
7 years ago
Jonas Östanbäck 5db5e16ab6 Correct grammar in APIEmpty documentation (#1748)
* Correct grammar in APIEmpty doc

* Generate swagger.v1.json
7 years ago
Ethan Koenig 9e627af9a4 gofmt (#1710) 7 years ago
Ethan Koenig 5ca3046da6 Fix rendering of issue checkboxes (#1709) 7 years ago
Lauris BH 524885dd65 LDAP user synchronization (#1478) 7 years ago
mappu fd76f090a2 markup: microoptimise for many short filenames in directory (#1534)
* markup: microoptimise for many short filenames in directory

Move strings.ToLower() after the early-return length check. This is a safe operation in all cases and should slightly improve directory listing performance when a directory contains many thousands of files with short filenames.

* markup: expand test cases for IsReadmeFile()
7 years ago
Lauris BH 51d0becb42 Add configuration option for default permission to create Organizations (#1686) 7 years ago
Lauris BH 9a0b0da1fe Fix commit sha1 URL rendering in markdown (#1677)
* Fix commit sha1 URL rendering in markdown

* Add unit test for commit sha1 markdown rendering when sha1 has space before it

* Change to better variable name
7 years ago
Lunny Xiao 1773e88643 Drop db operations from hook commands (#1514)
* move all database operations from hook command to web command and instead of internal routes

* bug fixed

* adjust the import path sequences

* remove unused return value on hookSetup
7 years ago
Antoine GIRARD 3edb0c5894 Generate swagger json (#1402)
- Generate swagger.json into public/
- Add swagger-ui auto-installation
- Add footer link to local swagger-ui
- Add /swagger url for using app url.
- Fix Swagger-UI version via git tag
7 years ago
Lunny Xiao 0d1e001b9c fix multiple readme file rendering and fix #1657 (#1658)
* fix multiple readme file rendering and fix #1657

* remove unnecessary loop
7 years ago
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor (#1502)
* Do not allow commiting to protected branch from online editor

* Add editor integration tests for adding new file and not allowing to add new file to protected branch
7 years ago
Lunny Xiao 3ebbdfaa75 make openid support default false for compitable with v1.1 (#1650) 7 years ago
Willem van Dreumel 950f2e2074 Additional OAuth2 providers (#1010)
* add google+

* sort signin oauth2 providers based on the name so order is always the same

* update auth tip for google+

* add gitlab provider

* add bitbucket provider (and some go fmt)

* add twitter provider

* add facebook provider

* add dropbox provider

* add openid connect provider incl. new format of tips section in "Add New Source"

* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)

* imports according to goimport and code style

* make it possible to set custom urls to gitlab and github provider (only these could have a different host)

* split up oauth2 into multiple files

* small typo in comment

* fix indention

* fix indentation

* fix new line before external import

* fix layout of signin part

* update "broken" dependency
7 years ago
Antoine GIRARD 8371f94d06 Rework SSH key management UI to add GPG (#1293)
* Rework SSH key management UI to add GPG

* Add more detail to gpg key display

* Update CHANGELOG.md

* Implement deletion UI

* Implement adding gpg UI

* Various fixes

- Fix duplicate entry in locale
- Re-generate hash before verification since they are consumed

* Add missing translation

* Split template

* Catch not found/verified email error
7 years ago
Morlinest fcc7cdab11 Fix markdown rendering (#1530) 7 years ago
Lunny Xiao 52627032bc Add markup package to prepare for org markup format (#1493) 7 years ago
Lunny Xiao f0db3da713 fix go get sub package and add domain on installation to let go get work defaultly (#1518)
* fix go get sub package and add domain on installation to let go get work defaultly

* fix import sequence

* fix .git problem
7 years ago
Lunny Xiao a2d365c81f fix #1501 ssh hangs caused by #1461 (#1513) 7 years ago
Lunny Xiao 2eeae84cbd Add internal routes for ssh hook comands (#1471)
* add internal routes for ssh hook comands

* fix lint

* add comment on why package named private not internal but the route name is internal

* add comment above package private why package named private not internal but the route name is internal

* remove exp time on internal access

* move routes from /internal to /api/internal

* add comment and defer on UpdatePublicKeyUpdated
7 years ago
Lauris BH f42ec6120e Better URL validation (#1507)
* Add correct git branch name validation

* Change git refname validation error constant name

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add git reference name validation unit tests

* Remove unused variable in unit test

* Implement URL validation based on GoLang url.Parse method

* Backward compatibility with older Go compiler

* Add url validation unit tests
7 years ago
Kim "BKC" Carlbäcker d409d3ab57 Sanitation fix from Gogs (#1461)
* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks
7 years ago
Jonas be6edaddcb Repo size in admin panel (#1482)
* Implementation of the feature to view repository size in admin panel
 * Move GetRepoSize to git module
 * Repository.RepoSize -> Repository.Size
 * RepoSize -> Size in template
 * Redo a few bits and pieces
 * Update size when syncing mirror or forking
 * Remove GetRepoSize
 * Changed fatal errors to error message

* Copy migration code from Gogs

* make fmt
7 years ago
Jonas 54f0293f0a Mirror sync interval specified as duration string (#1407)
* Sync interval specifed as duration string

* Changed mirror interval text

* make fmt

* Add MinInterval for mirror sync

* Use duration internally

* Changed min default to 10m

* make fmt

* Incorrect default

* Removed defaults in MustDuration()

* Add Mirror interval migration

* Default values corrected

* Use transaction during migration

* Change http 500 to page with error message

* Cleanup session.commit()
7 years ago
Mura Li b746757209 Remove unused mutex field (#1440) 7 years ago
Mura Li 93c25c9a35 Fix races in the log module by using syncmap (#1421) 7 years ago
Jonas 095e1f5155 Support for custom html meta (#1423)
* Support for custom html meta

* Changed html meta description default
7 years ago
Sandro Santilli 129b0d6a4b Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION (#1369)
* Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION

Omit the configuration variable (the default) to be dependent.
Fixes #1363

* Move OpenID settings under Service object

* Show OpenID SignUp and SignIn status in admin panel / configuration
7 years ago
Bo-Yi Wu 08f7fded3c refactor: remove workaround after the golang 1.7 release. (#1349)
* refactor: remove workaround after the golang 1.7 release.

* remove unused import.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* refactor: Add remove function.

* refactor: rename

* refactor: update build flag
7 years ago
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