63 Commits (edbb9eefd6c12d6c67bf864539a51f5a09c7d670)

Author SHA1 Message Date
Philippe Kueck fe94032f74 rewrite pre-commit, post-commit and options hooks (fixes #1250) (#1257)
* issue #1250, replace {pre,post}-receive and update hooks with a single shell script that does not require custom hooks to be a sh-script

* issue #1250, make script posix compilant

* v23, add migration script to update {pre,post}-receive and update hooks

* migration: use a more common name and rename v23 to v26 to avoid conflicts

* gofmt'ed and added copyright header

* fix SyncRepositoryHooks to also sync wiki repos
7 years ago
Sandro Santilli 9182a35f18 Show user OpenID URIs in their profile (#1314) 7 years ago
Lunny Xiao 608cd54a68 fix gpg wrong column types 7 years ago
Sandro Santilli 71d16f69ff Login via OpenID-2.0 (#618) 7 years ago
Sandro Santilli 8746fb3385 Fix migration comment (#1241) 7 years ago
Lunny Xiao 1ccdf19fae fix forget migration for wiki hooks (#1227) 7 years ago
Lunny Xiao ef13bbaf7d Don't rewrite non-gitea public keys (#906)
* don't rewrite non-gitea public keys

* add comment for public key
7 years ago
Sandro Santilli bf24099114 Allow migrating installations with no local avatars (#1056) 7 years ago
Lunny Xiao 80f900ebae Fix avatar enumable (#1049)
* fix avatar enumable

* fix import style
7 years ago
Lunny Xiao 0e6b9ea786 Take back control of hooks (#1006)
* git: delegate all server-side Git hooks (#1623)

* create hooks directories

* take control hooks back

* fix lint

* bug fixed and minor changes

* fix imports style

* fix migration scripts
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 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
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
Schwobaland c0904f1942 Restrict creating organisations by user (#193)
* restrict creating organizations based on right on user

* revert bindata.go

* reverse vendor lib

* revert goimports change

* set AllowCreateOrganization default value to true

* revert locale

* added default value for AllowCreateOrganization

* fix typo in migration-comment

* fix comment

* add coments in migration
8 years ago
Bwko 331316894e Replace Gogs with Gitea (#520) 8 years ago
btrepp 25b5ffb6af Enables mssql support (#383)
* Enables mssql support

Port of dlobs work in gogs.
Enables options in index.js
Enables MSSQL as a database option in go.
Sets ID to 0 on initial migration. Required for
MSSQL insert statements.

Signed-off-by: Beau Trepp <beautrepp@gmail.com>

* Vendors in denisenkom/go-mssqldb

Includes golang.org/x/crypto/md4
as this is required by go-msssqldb

Signed-off-by: Beau Trepp <beautrepp@gmail.com>
8 years ago
Denis Denisov 380e32e129 Fix random string generator (#384)
* Remove unused custom-alphabet feature of random string generator

Fix random string generator

Random string generator should return error if it fails to read random data via crypto/rand

* Fixes variable (un)initialization mixed assign
Update test GetRandomString
8 years ago
Lunny Xiao 27d66855eb golint fixed for models/migrations (#291) 8 years ago
Andrey Nering 739f07c98e Remember diff view style (#163) 8 years ago
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io (#135)
- Update import paths from github.com/go-gitea to code.gitea.io
- Fix import path for travis

See https://docs.travis-ci.com/user/languages/go#Go-Import-Path
8 years ago
Lunny Xiao 7dcc3bc3d7 use x.SQL instead of x.Sql 8 years ago
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs (#37) 8 years ago
Unknwon c2afdf2192 Minor code fix [CI SKIP] 8 years ago
Unknwon 37305a59ca migrations: sync table first 8 years ago
Unknwon bb359a74f1 migrations: set comment updated as created 8 years ago
Unknwon 250be011c7 Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
8 years ago
Unknwon 52322ef624 models/user_mail: refactor EmailAddress 8 years ago
Unknwon 401bf944ef Use SecurityProtocol to replace UseSSL in LDAP config
Initially proposed by #2376 and fixes #3068 as well.
8 years ago
Unknwon ad513a20e9 #2302 Replace time.Time with Unix Timestamp (int64) 8 years ago
Unknwon ac78bae7b5 Replace uuid module with original package 8 years ago
Unknwon 3362b3a44f fix possible disclosure 9 years ago
Unknwon 7a3eccc709 Drop 0.5.x support 9 years ago
Unknwon eb30cbab81 add unsupported migration prompt 9 years ago
Unknwon b55499d039 go vet and fix #1890 9 years ago
Unknwon 67ced4aaca safe check 9 years ago
Unknwon cb100c7781 work #1705 9 years ago
Unknwon fc7959d3bc New/reopen PR checks if there is any unmerged and open PR 9 years ago
Unknwon 1453e91f41 minor fix on API response 9 years ago
Unknwon 34f6cbfc2a finish attachments when create issue 9 years ago
Unknwon 887bc1b594 Merge branch 'develop' of github.com:gogits/gogs into feature/pull_request2
# Conflicts:
#	modules/bindata/bindata.go
#	public/css/gogs.min.css
9 years ago
Unknwon 2aea247208 minor fix on #1460 9 years ago
Unknwon 17de3ab0a3 add migrate from issue.label_ids to issue_label 9 years ago
Unknwon 39a3b768bc #334: Add Deployment Key Support 9 years ago
Unknwon 686dd59916 fix #864 with migration and update locale 9 years ago
Unknwon 99b774e741 auto fix locale file name change 9 years ago
Unknwon 2bb982dada #1080: Remove footer ads/branding from default template 9 years ago
Unknwon 6b70a0c0d9 #1032: legacy code can have duplicated IDs for same repository 9 years ago
Unknwon 63a73b43b4 models/migrations: fix update error 9 years ago
Unknwon ee68a826a5 v4 migration, merge 'dev', clean code and mirror fix 9 years ago