Commit Graph

1427 Commits (bb5f694fc57c3ade9c13e841b9a237f4e192da22)

Author SHA1 Message Date
Lunny Xiao 0d1e001b9c fix multiple readme file rendering and fix ()
* fix multiple readme file rendering and fix 

* remove unnecessary loop
Lauris BH 0144817971 Do not allow commiting to protected branch from online editor ()
* 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
Lunny Xiao 3ebbdfaa75 make openid support default false for compitable with v1.1 ()
Willem van Dreumel 950f2e2074 Additional OAuth2 providers ()
* 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
Antoine GIRARD 8371f94d06 Rework SSH key management UI to add GPG ()
* 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
Morlinest fcc7cdab11 Fix markdown rendering ()
Lunny Xiao 52627032bc Add markup package to prepare for org markup format ()
Lunny Xiao f0db3da713 fix go get sub package and add domain on installation to let go get work defaultly ()
* fix go get sub package and add domain on installation to let go get work defaultly

* fix import sequence

* fix .git problem
Lunny Xiao a2d365c81f fix ssh hangs caused by ()
Lunny Xiao 2eeae84cbd Add internal routes for ssh hook comands ()
* 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
Lauris BH f42ec6120e Better URL validation ()
* 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
Kim "BKC" Carlbäcker d409d3ab57 Sanitation fix from Gogs ()
* Santiation fix from Gogs

* Linting

* Fix build-errors

* still not working

* Fix all the things!

* gofmt

* Add code-injection checks
Jonas be6edaddcb Repo size in admin panel ()
* 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
Jonas 54f0293f0a Mirror sync interval specified as duration string ()
* 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()
Mura Li b746757209 Remove unused mutex field ()
Mura Li 93c25c9a35 Fix races in the log module by using syncmap ()
Jonas 095e1f5155 Support for custom html meta ()
* Support for custom html meta

* Changed html meta description default
Sandro Santilli 129b0d6a4b Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION ()
* Allow ENABLE_OPENID_SIGNUP to depend on DISABLE_REGISTRATION

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

* Move OpenID settings under Service object

* Show OpenID SignUp and SignIn status in admin panel / configuration
Bo-Yi Wu 08f7fded3c refactor: remove workaround after the golang 1.7 release. ()
* 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
Sandro Santilli f73e734411 Run "make fmt" with go-1.6 ()
caiwp dbabc35e71 Delete the useless code ()
Lunny Xiao 8bcb643a03 remove empty file ()
Bo-Yi Wu 1c3bd436cc feat: Only use issue and wiki on repo. ()
Sandro Santilli 71d16f69ff Login via OpenID-2.0 ()
Lunny Xiao 3cf0e513e6 fix wrong log when push to a new branch ()
Ethan Koenig 17f403fbcd Fix nil-dereference bug
Ethan Koenig 021904e4e6 Fix typos in models/ and modules/ ()
Ethan Koenig ec0ae5d50c Refactor and fix incorrect comment ()
Andrey Nering d2b2881306 Fix Git hooks not being executed on Windows when running as a service ()
Closes 
Bo-Yi Wu 0afab87631 refactor: remove redundant slash. ()
Bo-Yi Wu 28a5bc313a fix: gofmt errors. ()
Schwobaland 2f7dc28b22 add ProxyFromEnvironment if none set ()
Jonas f3bf409082 Log config pretty printer ()
Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>
Lunny Xiao 0380ce269f add back the default setting values and fix ()
Thomas Boerger db6777d369 Fixed custom templates for static builds ()
Lunny Xiao c2eef171ff fix some typos ()
Jonas a201977590 Fix for : Embed build tags ()
* Fix for 
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
Andrey Nering f552b0a207 Remove test that touch network
Andrew Boyarshin 0602a44b27 Fix URL handling in the whole markdown module, improve test coverage ()
Amended with string to bool change in API SDK.

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

Signed-off-by: P.B. <puffybsd@yahoo.com>
Lunny Xiao d6748284bd fix panic when push but the only log mode console is disabled by serv and update commands ()
Willem van Dreumel 01d957677f Oauth2 consumer ()
* 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)
Denis Denisov fd941db246 Protected branches system ()
* 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
Lunny Xiao 70ae6d197b disable console output xorm log on ssh ()
Lunny Xiao 04fdeb9d8d Make Xorm log configurable ()
* make xorm log configable

* bug fixed for other sub commands except web

* rebase and fix xorm log

* bug fix for TrimSpace
Unknwon 134f3e6e09 Security: prevent XSS attach on wiki page
Reported by Miguel Ángel Jimeno.
Lunny Xiao cf47532ebc fix ssh domain default value to domain ()
Bo-Yi Wu d67b278a0d feat: Able to disable non-admin to create new organization ()
Andrew Boyarshin dc8248f8a4 Markdown rendering overhaul ()
* 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>
Bo-Yi Wu 5cc275b1de feat: add git version on admin panel. ()