Commit graph

5187 commits

Author SHA1 Message Date
Lunny Xiao
e8e56da9ac fix #13 (#1042) 2017-02-25 22:53:57 +08:00
Andrey Nering
ddb0287bf6 Merge pull request #970 from andreynering/api-repo-mirror
Add "mirror" field to repo API
2017-02-25 11:35:03 -03:00
Andrey Nering
c4a3d5148d Merge pull request #1053 from andreynering/do-not-test-libravatar
Remove test that touch network
2017-02-25 11:27:45 -03:00
Lunny Xiao
fc4f7e82f9 refactor for searching user (#1038)
* refactor for searching user

* fix like bug

* better format for builder cond
2017-02-25 21:42:20 +08:00
Lunny Xiao
8894f856de fix 500 when change user setting email to an exist email (#1039) 2017-02-25 21:39:52 +08:00
Andrey Nering
f552b0a207 Remove test that touch network 2017-02-25 10:32:15 -03:00
Andrey Nering
d7af8f96d7 Update vendor of code.gitea.io/sdk/gitea 2017-02-25 10:04:22 -03:00
Andrey Nering
946f3078d3 Add "mirror" field to repo API 2017-02-25 10:04:22 -03:00
Andrey Nering
d4a7040c7f Merge pull request #1043 from andrew-boyarshin/autolink
Fix span wrapping all the things
2017-02-25 09:31:28 -03:00
Jonas
9ad3a07989 Fix for #1037: Corrected process ID placeholder to PID from Pid (#1048)
Signed-off-by: Jonas Östanbäck <jonas.ostanback@gmail.com>
2017-02-25 11:12:46 +08:00
Sandro Santilli
44827698e2 Reword the reinit_missing_repos message to be clear about what it does (#1047)
I was confused by current wording, which seemed to imply that
*records* would be initialized, while instead the function initializes
the *git repositories* instead, where missing but referenced.
2017-02-25 11:12:17 +08:00
Bo-Yi Wu
f1412142e0 refactor: repo counts for SearchRepositoryByName func (#1045) 2017-02-25 09:27:39 +08:00
Lunny Xiao
c0ea3963be fix delete repo will hang on postgres (#1044) 2017-02-24 23:19:13 +08:00
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>
2017-02-24 22:59:56 +08:00
Andrew Boyarshin
817710dd47
Fix span wrapping all the things
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
2017-02-24 18:49:04 +07:00
Lunny Xiao
12e71e5706 Removed footer copyright year (#829)
* change footer copyright year from 2016 to 2017

* add 2016 copyright back

* remove the copyright year
2017-02-24 16:21:45 +08:00
Ethan Koenig
76057105ca Remove unnecessary loads in org_team (#1035) 2017-02-24 14:25:09 +08:00
Ethan Koenig
f1ab906c51 Unit tests for models/repo_collaboration (#1032) 2017-02-24 09:37:38 +08:00
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>
2017-02-24 09:37:13 +08:00
Dan Morrill
832477b1bc Tweak docker target to work by default. (#1033)
Fix for #1013: adds "bindata" to tags by default, as without this the
resulting docker image won't start, as it doesn't contain locale files.
Verified to work even if you specify TAGS="bindata" such that it appears
twice.
2017-02-24 09:33:09 +08:00
bit
490d3771f7 s/fields/terms (#1031)
use terms instead of fields as variable name to avoid confusion: NewPhraseQuery(terms []string, field string)
2017-02-24 09:24:58 +08:00
Lunny Xiao
d077fd084a added missing new struct sync (#1021) 2017-02-23 15:05:37 +08:00
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
2017-02-23 11:40:44 +08:00
Ethan Koenig
4f3880ff15 Bug fixes and unit tests for org_team (#1016) 2017-02-23 09:36:15 +08:00
Andrey Nering
d181113b82 Merge pull request #1017 from ethantkoenig/fix_lint
Fix lint errors
2017-02-22 21:14:54 -03:00
Ethan Koenig
ec3a696e2d Fix lint errors 2017-02-22 17:10:45 -05:00
Lunny Xiao
1f7837d6d6 Refactor for issues loadattributes of a repository (#971)
* refactor for issues loadattributes of a repository

* refactors
2017-02-22 22:03:59 +08:00
Bo-Yi Wu
29c6f32a3b Fix some links. (#1005) 2017-02-22 21:21:25 +08:00
Bo-Yi Wu
83b6d03231 fix: Wrong repo list on Explore page if user already loggin. (#1009)
* fix: Wrong repo list on Explore page if user already loggin.

* fix: code readable.

* fix: declare variable
2017-02-22 21:15:14 +08:00
Lunny Xiao
d6748284bd fix panic when push but the only log mode console is disabled by serv and update commands (#1007) 2017-02-22 19:44:51 +08:00
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)
2017-02-22 08:14:37 +01:00
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
2017-02-21 23:02:10 +08:00
Thomas Boerger
fe5ff8e4b2 Added 1.0.2 to changelog (#998) 2017-02-21 22:38:38 +08:00
Lunny Xiao
70ae6d197b disable console output xorm log on ssh (#993) 2017-02-21 21:34:05 +08:00
Christoph König
ffde33bdfa Fix typo (#990) 2017-02-21 09:14:37 +08:00
Willem van Dreumel
5f234ce2a5 add missing copyright header (#992) 2017-02-21 08:46:14 +08:00
Lunny Xiao
c5f8b96dda update xorm for fixing bug on processor BeforeSet and AfterSet when Find a map (#987) 2017-02-20 19:33:10 +08:00
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
2017-02-20 16:11:13 +08:00
Andrew Boyarshin
d4b752def9 Fix table headers (#980)
Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
2017-02-20 11:13:20 +08:00
Lunny Xiao
c2c27891c9 add release cycle to contributing (#949) 2017-02-19 23:23:37 +08:00
Lunny Xiao
b8f70a27a5 Security: fix XSS attack on alert (#973) 2017-02-19 19:18:06 +08:00
Lunny Xiao
6076c95dd1 Security: fix XSS attack on milestone (#976)
Reported by Miguel Ángel Jimeno.
2017-02-19 19:09:59 +08:00
Lunny Xiao
dbe6d2ff8e fix docker link on install page (#964) 2017-02-18 22:19:51 +08:00
Bo-Yi Wu
252adc912d refactor: update debian script. (#965) 2017-02-18 18:23:37 +08:00
Ethan Koenig
be48b32e63 Unit tests for repo watching (#963) 2017-02-17 16:02:11 +08:00
Lunny Xiao
847527fd6d Fix all the bugs in issues and pulls on dashboard (#943)
* fix all the bugs in issues and pulls on dashboard

* small fix and refactor

* add method getRepoIDs for IssueList
2017-02-17 08:58:19 +08:00
Kim "BKC" Carlbäcker
669dad71f8 Add Screenshot-secion to IssueTemplate.md (#939)
For `UI`-bugs we usually require a Screenshot to debug it 😉
2017-02-17 08:58:01 +08:00
Ethan Koenig
140967f002 Unit tests for repo redirects (#961) 2017-02-17 08:55:33 +08:00
Bo-Yi Wu
4c12e2a4b9 fix: fill in ssh key title on setting of repo (#950)
* fix: fill in ssh key title on setting of repo

* fix: Don't overwrite ssh key title if exist.
2017-02-16 05:16:42 +01:00
Lunny Xiao
7fd14bf7bd optimization for team get repos (#953) 2017-02-16 12:07:58 +08:00