2
0
Commit Graph

289 Commits

Author SHA1 Message Date
Bwko
ae5d868288 Add option to app.ini to enable local import paths (#724) 2017-01-23 09:19:50 +08:00
Ethan Koenig
a42a9c1da1 Fix permission bugs in team API (#647) 2017-01-20 13:16:10 +08:00
Ethan Koenig
39f1be75c3 API Endpoints for organization members (#645) 2017-01-20 10:31:46 +08:00
derSuessmann
59bc880e0d Add Keep email private (see issue #571). (#571)
- Add site-wide option DEFAULT_KEEP_EMAIL_PRIVATE.
- Add the new option to the install and admin/config pages.
- Add the new option to app.ini in the service section.
- Add the new option to the settings struct.
- Add English text strings to i18n.
- Add field KeepEmailPrivate to user struct.
- Add field KeepEmailPrivate to user form.
- Add option to UI.
- Add using noreply email address if user has "Keep Email Private".
An email address <LowerName>@<NO_REPLY_ADDRESS> is now used in commit
messages (and hopefully all other git log relevant places). The
change relies on the fact that git commands should use
user.NetGitSig().
- Add hiding of email address in UI, if user has set "Keep Email Private".
- Add condition to show email address only on explore/users and user
pages, if user has not set "Keep Email Private".
- Add noreply email in API if set "Keep Email Private".
- Add a new service setting NO_REPLY_ADDRESS. The value of this
setting is used as the domain part for the user's email address in
git log, iff he decides to keep his email address private.
If the user decides to keep his email address private and this
option is not set 'noreply.example.org' is used, which no MTA
should send email to.

Add NO_REPLY_ADDRESS to conf/app.ini.
2017-01-08 11:12:03 +08:00
Andrey Nering
df3a195814 Create missing database indexes (#596) 2017-01-06 23:14:33 +08:00
Berk Demirkır
ff369ac504 Check primary email address fields on CreateUser (#556)
* Check primary email address fields on CreateUser

As this check wasn't available, uid=1 (and possibly guests too, if registration is open) is able to register new users with existing email addresses. This leads to numerous 500 errors.

* Update user.go

* Lower the email first. Then check
2017-01-05 08:52:20 +08:00
Ethan Koenig
439ab34752 Fix typos in models/ (#576) 2017-01-05 08:50:34 +08:00
Schwobaland
d8821eec53 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
2016-12-31 10:33:30 +08:00
Lunny Xiao
c60ec2bc54 fix 500 when delete orgnization and resolved #486 2016-12-27 12:00:12 +01:00
Bwko
5753c68f36 Added sorting to organizations, repos & users page (#222) 2016-12-24 22:42:26 +08:00
Ethan Koenig
cd43fa1ff5 API Endpoint for watching (#191) 2016-12-24 09:53:11 +08:00
Denis Denisov
6669a9d490 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
2016-12-20 13:32:02 +01:00
Lunny Xiao
fb12d964b8 Don't use custom PBKDF2 function (#382) 2016-12-15 09:24:27 +08:00
Denis Denisov
08ee5adfb4 Safe compare password (timing attack) (#338) 2016-12-03 13:49:17 +08:00
Bwko
e5314f667c Catch os... errors 2016-12-02 07:41:19 +01:00
Kim "BKC" Carlbäcker
ea3af7405b Fix breakage from vendor-update 2016-11-29 11:50:22 +01:00
Bwko
a5485d2927 Lint models/user.go 2016-11-28 17:47:46 +01:00
Bwko
334903e306 Fixes typos 2016-11-27 12:59:12 +01:00
Lunny Xiao
c9d61f0e2a Golint fixed for modules/setting (#262)
* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
2016-11-27 18:14:25 +08:00
Lunny Xiao
795095ff2a golint fixed for modules/avatar 2016-11-25 16:37:04 +08:00
Ethan Koenig
875d9751aa API endpoints for stars 2016-11-16 22:51:54 -05:00
Andrey Nering
c8faf267df Remember diff view style (#163) 2016-11-13 10:54:04 +08:00
LefsFlare
3049160a97 Fixes possible vulnerabilities with keyword hijacking (#20)
- Added public entries to reserved keywords list
- Rename variables
- Derped comment
2016-11-12 13:26:45 +01:00
Lunny Xiao
77d949dd16 bug fixed caused by #153 (#154) 2016-11-12 09:30:46 +01:00
Lunny Xiao
e0447d8fc1 fixed bug #151 caused Find should be Get (#153) 2016-11-12 00:01:09 +01:00
Sandro Santilli
d246d7acb7 Fix import path of go-sdk (#141)
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
2016-11-11 17:39:44 +08:00
Thibault Meyer
0971249a03 Merge remote-tracking branch 'upstream/master' into feature/rewrite-xorm-queries
# Conflicts:
#	models/git_diff.go
#	models/issue.go
#	models/org.go
#	models/pull.go
#	models/repo.go
2016-11-10 21:05:52 +01:00
Thibault Meyer
50df9768f3 Rewrite XORM queries 2016-11-10 20:59:51 +01:00
Sandro Santilli
acb138c244 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
2016-11-10 17:24:48 +01:00
Lunny Xiao
4b632bb41b Merge pull request #121 from joubertredrat/feature-last-login
Last Login for admin manage your users
2016-11-10 17:20:55 +08:00
Lunny Xiao
f4517ba470 Merge pull request #129 from lunny/lunny/SQL_instead_Sql
use x.SQL instead of x.Sql
2016-11-10 17:12:14 +08:00
Thibault Meyer
f88090a2fe Ordering organizations and users by name 2016-11-10 09:18:54 +01:00
Lunny Xiao
ce784fdfad use x.SQL instead of x.Sql 2016-11-10 15:20:48 +08:00
Joubert RedRat
8c1f9a1283 Support to last login feature 2016-11-09 08:53:45 -02:00
Sandro Santilli
740e0514cf And others 2016-11-07 17:53:22 +01:00
Sandro Santilli
fefdd3bbaf More... 2016-11-07 17:30:04 +01:00
Sandro Santilli
78d721a905 ACCESS_MODE_* -> AccessMode* 2016-11-07 17:20:37 +01:00
Thomas Boerger
8370af17f2 Replaced go-gogs-client with go-sdk imports 2016-11-07 16:10:32 +01:00
Sandro Santilli
2cc11efdcf Replace gogits/git-module dependency with go-gitea/git (#94)
* Replace gogits/git-module dependency with go-gitea/git

Fixes #92

* Remove git alias for git module import (not needed)
2016-11-06 11:18:34 -02:00
Rémy Boulanouar
61ec6729e6 Change import reference to match gitea instead of gogs (#37) 2016-11-03 10:29:56 -02:00
Unknwon
386f762386 #3577 incorrect URL produced by AvatarLink 2016-09-01 12:36:26 -04:00
Unknwon
d2fc115de3 #3515 use alert instead 500 for duplicated login source name 2016-08-31 00:56:10 -07:00
Unknwon
a5d8695d08 #3505 use user’s info for committer and author 2016-08-27 13:37:55 -07:00
Unknwon
a2c880ef17 #2246 fully support of webhooks for pull request 2016-08-14 03:32:24 -07:00
Sandro Santilli
82d2c65308 Add support for federated avatars (#3320)
* Add support for federated avatars

Fixes #3105

Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)

Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive

Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading

* Run gofmt on all modified files

* Move Avatar form in its own page

* Add go-libravatar dependency to vendor/ dir

Hopefully helps with accepting the contribution.
See also #3214

* Revert "Add go-libravatar dependency to vendor/ dir"

This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.

* Make federated avatar setting a global configuration

Removes the per-user setting

* Move avatar handling back to base tool, disable federated avatar in offline mode

* Format, handle error

* Properly set fallback host

* Use unsupported github.com mirror for importing go-libravatar

* Remove comment showing life exists outside of github.com

... pity, but contribution would not be accepted otherwise

* Use Combo for Get and Post methods over /avatar

* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR

* Fix persistance of federated avatar lookup checkbox at install time

* Federated Avatars -> Enable Federated Avatars

* Use len(string) == 0 instead of string == ""

* Move import line where it belong

See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md

Pity the import url is still the unofficial one, but oh well...

* Save a line (and waste much more expensive time)

* Remove redundant parens

* Remove an empty line

* Remove empty lines

* Reorder lines to make diff smaller

* Remove another newline

Unknwon review got me start a fight against newlines

* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE

On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106

* Remove newlines that weren't there before my intervention
2016-08-07 10:27:38 -07:00
Unknwon
99728407d4 #3393 fix missing sub-url prefix in relative avatar link 2016-08-07 10:13:05 -07:00
Unknwon
53a0407083 #3348 always use relative avatar link in the template 2016-08-05 12:12:54 -07:00
Unknwon
a09fe55fb8 #3281 fix x.Iterate returns nothing inside session scope with SQLite3 2016-07-26 17:26:48 +08:00
Unknwon
631af92670 #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Unknwon
48b0d21673 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00