Commit Graph

491 Commits (ddc709ff7f94bd627ac05209a16ea5a5e24b7413)

Author SHA1 Message Date
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.
Bo-Yi Wu d7d094bd8a fix: ignore email notifications if user is not active. ()
Bwko 74ed6dc3ad Add option to app.ini to enable local import paths ()
Ethan Koenig 74bbec3bf9 Fix permission bugs in team API ()
Ethan Koenig fcf02e4961 API Endpoints for organization members ()
derSuessmann 51d578ff33 Add Keep email private (see issue ). ()
- 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.
Andrey Nering 84b7d29d34 Create missing database indexes ()
Berk Demirkır bdad3b259a Check primary email address fields on CreateUser ()
* 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
Ethan Koenig 1207bda94b Fix typos in models/ ()
Schwobaland c0904f1942 Restrict creating organisations by user ()
* 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
Lunny Xiao ba134bd27a fix 500 when delete orgnization and resolved
Bwko fa3abc22c0 Added sorting to organizations, repos & users page ()
Ethan Koenig 8a4161c723 API Endpoint for watching ()
Denis Denisov 380e32e129 Fix random string generator ()
* 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
Lunny Xiao d771e978a1 Don't use custom PBKDF2 function ()
Denis Denisov c8f300b2cd Safe compare password (timing attack) ()
Bwko 4ff0db0246 Catch os... errors
Kim "BKC" Carlbäcker 42ec5ce740 Fix breakage from vendor-update
Bwko 9963d61233 Lint models/user.go
Bwko a4ece1f223 Fixes typos
Lunny Xiao 94da472717 Golint fixed for modules/setting ()
* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
Lunny Xiao 3c87c57d96 golint fixed for modules/avatar
Ethan Koenig 0834e492c0 API endpoints for stars
Andrey Nering 739f07c98e Remember diff view style ()
LefsFlare 3ef022b071 Fixes possible vulnerabilities with keyword hijacking ()
- Added public entries to reserved keywords list
- Rename variables
- Derped comment
Lunny Xiao 0baaa7728a bug fixed caused by ()
Lunny Xiao 555d8b16cb fixed bug caused Find should be Get ()
Sandro Santilli a1c5f02444 Fix import path of go-sdk ()
From code.gitea.io/go-sdk/gitea
  To code.gitea.io/sdk/gitea
Thibault Meyer b0ddced2b5
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
Thibault Meyer a4454f5d0f
Rewrite XORM queries
Sandro Santilli 4247304f5a Update import paths from github.com/go-gitea to code.gitea.io ()
- 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
Lunny Xiao 1b238fe4d5 Merge pull request from joubertredrat/feature-last-login
Last Login for admin manage your users
Lunny Xiao c6c840faf7 Merge pull request from lunny/lunny/SQL_instead_Sql
use x.SQL instead of x.Sql
Thibault Meyer 3a10a0c1ca
Ordering organizations and users by name
Lunny Xiao 7dcc3bc3d7 use x.SQL instead of x.Sql
Joubert RedRat f91cbf0fed Support to last login feature
Sandro Santilli aadd7dcdc3 And others
Sandro Santilli 60c82a8780 More...
Sandro Santilli f388661bda ACCESS_MODE_* -> AccessMode*
Thomas Boerger 4c6c16f358
Replaced go-gogs-client with go-sdk imports
Sandro Santilli 6e4252dad4 Replace gogits/git-module dependency with go-gitea/git ()
* Replace gogits/git-module dependency with go-gitea/git

Fixes 

* Remove git alias for git module import (not needed)
Rémy Boulanouar 2d68bd1ef9 Change import reference to match gitea instead of gogs ()
Unknwon c50d59874d
incorrect URL produced by AvatarLink
Unknwon 99c2ae7b35 use alert instead 500 for duplicated login source name
Unknwon c30b856d14 use user’s info for committer and author
Unknwon 3f7f4852ef fully support of webhooks for pull request
Sandro Santilli 90dd0657b5 Add support for federated avatars ()
* Add support for federated avatars

Fixes 

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 

* 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
Unknwon ec92565f23 fix missing sub-url prefix in relative avatar link
Unknwon 50422f1fc2 always use relative avatar link in the template
Unknwon 2d76de2574 fix x.Iterate returns nothing inside session scope with SQLite3
Unknwon e74630ae3b add pagination for repositories
Unknwon 1f2e173a74 Refactor User.Id to User.ID
Unknwon 46e96c008c Use struct for UI settings
Unknwon 250be011c7 Remove redundant Unix timestamp method call
Unix() already uses UTC as timezone
Unknwon 69f5308761 use different reversed words and patterns for repository and user
Dennis Chen 6488ee12be avatar: make custom and generated avatars equal ()
Sets all avatars to use PNG image format.
Keeps avatars consistent at 290x290px resolution.

Signed-off-by: Dennis Chen <barracks510@gmail.com>
Unknwon c083d76567 able to prohibit user login
Unknwon 52322ef624 models/user_mail: refactor EmailAddress
Sandro Santilli a4ea3bd015 Return avatar link as absolute url ()
Fixes relative urls coming from api/v1

See https://github.com/drone/drone/issues/1701
Sandro Santilli 8a248696e9 Use a gopher as default avatar (rather than the gravatar logo) ()
Also changes the avatar from a jpeg to a png, to allow for
transparent background. The indexed png is also smaller in size.

Note that at the moment the default avatar is only used when
the user requested a custom avatar and the custom avatar file
is not found (should never happen).

In the future the default avatar could be used as a default
return when by-mail avatar lookups fail too (both gravatar
and libravatar support passing a default)
Unknwon ff731ea07d LOWER() column value within search
Odin Ugedal 6ccb2d36cf Remove email from user search
Odin Ugedal 3253e3c5aa Make user search look in username, name and email
Make user search function look in username (lower_name), full name
(full_name) and primary email (email). This will benefit searching after
user in "explore", admin panel and when adding new collaborators.
Unknwon 263304b6b7 fix postgres aggregate
Unknwon 2bf8494332 finish user and repository search
Both are possible on explore and admin panel
Unknwon ad513a20e9 Replace time.Time with Unix Timestamp (int64)
Unknwon 13bd16af92 Minor fixes for
Tamás Molnár 9c91e27933 Added: Ability to delete org avatar.
Unknwon a5b0400be7 finish new access rights for collaborators
Unknwon a2f13eae55 some avatar setting changes
- Allow to delete current avatar
Unknwon 2d2d85bba4 support pull requests in same repository
Unknwon d5a3021a7d Make markdown as an independent module
Unknwon 58e004f7da Remove cache avatar support and add its tests
Unknwon f8182ac521 delete local wiki copy when rename repo and user
Unknwon 5a27aea8e0 Fix random avatar does not work on Windows
path.Dir can't handle Windows case, must use filepath.Dir
Unknwon 4deb876343 Minor fix for
- Change tooltip size from mini to tiny in profile page
Martin Hartkorn 674c5c37be Change user name in Pull Requests
Unknwon f43cc90841 Truncate repository name if too long
Angus Gibson e914969e4c Add default for NumFollowing field (fixes )
We set the default value for the non-NULL field NumFollowing of the User
model to 0, which stops an error when the ORM tries to sync.
Unknwon a49af93faf APIs: Users Followers
- User profile un/follow
- List user's followers/following
Unknwon 9cd16c5b12 add organization APIs
Unknwon b117befc2b add user email APIs
Unknwon 19423957b1 rename import path
Unknwon 5d95ffe3eb The owner has reached maximum creation limit of 0 repositories
Unknwon 3d5d61778a disable password change for non-local users
Unknwon 99e9bbef6c fix bool check for repo max limit and fix hang when push repo with tons of commits
Unknwon 0e96a46020 fix user repo limit default value
Unknwon df5ed64cca "read-only" users
Unknwon 2a0bb1fa90 Limit repo creation
Unknwon 9a2e43bff2 move out git module and send push hook
Unknwon 830d000667 finish wiki
Unknwon 392f3ee210 wiki: finish new
Unknwon 3ca544912f Drop /org/ URL path prefix in organization home page
Unknwon ec8d41765d some fix to
Unknwon f04d773f4f UI: long organization name in create repository owner list
Unknwon 5dc3dd1704 fix
Unknwon 134d8e7681 work on
Unknwon 1d57f0d64f Show custom avatars in commits
Unknwon 1559bd58e7 save custom avatar as PNG
Unknwon f255b1e86d fatal when no needed update task
Unknwon 6f0a41b8b2 Allow local import only for admin users
Unknwon 022820103d allow forcing all private repos
Unknwon 3fb1b6a608 drop oauth2 feature support
Unknwon 373731f5e8 user gomail and new activate account email tpl
- : fallback plain text
- : add date header
- : fix encoding of header
Unknwon 2d1bb0cf49 admin delete user
Unknwon be89802bd8 new admin user list UI
Unknwon 52ec80fa18 finish all new user settings UI
Unknwon 3d9b98fae4 order owners list by last changed time
Unknwon 0806725ca5 minor fix on
Signed-off-by: Unknwon <u@gogs.io>
Unknwon 80701d45bb Make organization emails non-mandatory
Unknwon aa67de910a fix
Unknwon 1fd5f8edf8 fix
Unknwon 6ea28f2a47 work on
Unknwon 63fecac537 XSS in username
Unknwon d01f688257 fix repository count of user is messed up
Unknwon f509c59ac1 new create webhook event
Unknwon 46bee50e45 complate list of gitignores and licenses
Unknwon b900863d60 rename a user method
Unknwon 2881456421 new webhooks list UI
Unknwon 260301bf2e Removing deploy key does not remove key
Unknwon 47ac579f09 only assign auto-admin when sign up by web
Unknwon 407385db7e work on
Unknwon 30b428bf0e : 500 when visit a issue with issue/comments of deleted user
Unknwon 817b48ed1e Show owner/poster tags of comments and fix
Unknwon cafde1287e delete avatar when del user
无闻 9c0c16bb5a Merge pull request from jamesa/hide-gravatar-tooltip
Hide avatar tooltips unless you're looking at your own profile
James Anderson e5146155a0 Resize avatars to the same size they are displayed
Unknwon cbc7b7132f finish new issue action and mentions
Unknwon 75aff60c90 finish create issue with milestone and assignee
Unknwon a79586cc54 Merge branch 'develop' of github.com:gogits/gogs into feature/pull_request2
# Conflicts:
#	modules/bindata/bindata.go
#	public/css/gogs.min.css
#	templates/repo/header.tmpl
Unknwon 68b9d78386 remove sync.Pool and support go1.2 again
Unknwon 4b43ffc96c Generate random avatar based on e-mail when disable Gravatar
Unknwon dea3a8c6a4 WIP: create PR - choose branch
Unknwon b1f08d3218 more on
Unknwon d922b7e504 set first user to be admin
...not just ID=1
Unknwon 39a3b768bc : Add Deployment Key Support
Unknwon b9527cd1bf force downcase e-mail
Unknwon e50982f5ec allow anonymous SSH clone
Lunny Xiao 673a76d638 Merge pull request from mephux/hotfix/type-fix-ValidatePassword
Hotfix/type fix validate password
Dustin Willis Webber e57594dc31 typo fix for comment
Dustin Willis Webber f78046fc3b typo fix
Unknwon 698b9e2acc Clearer error message for illegal characters
Unknwon 466facc009 : Deleting users should remove them from collaborator lists
- fix delete user but repository watches are not decreased
Unknwon b72e75e522 : OFFLINE_MODE Still Uses Gravatar
Unknwon ee68a826a5 v4 migration, merge 'dev', clean code and mirror fix
Unknwon 7ccab9cd09 Merge branch 'dev' of github.com:gogits/gogs into access
Conflicts:
	gogs.go
	models/models.go
	models/user.go
	templates/.VERSION
	templates/org/home.tmpl
Unknwon 04164eada3 models: able to rename user with diff letter cases
- templates/org: mirror fix on name output
- routers: add missing error check
Unknwon 1654e9ecab templates/user/settings/emial.tmpl: little fix on UI
- routers/user: little code format
- conf/locale: update French locale
Unknwon 6d0f3a07d4 code fix caution: undertest
Peter Smit 6c1ee384f1 Merge remote-tracking branch 'mine/access_refactor' into access_refactor
Conflicts:
	cmd/serve.go
	models/access.go
	models/migrations/migrations.go
	models/org.go
	models/repo.go
	models/user.go
	modules/middleware/org.go
	modules/middleware/repo.go
	routers/api/v1/repo.go
	routers/org/teams.go
	routers/repo/http.go
	routers/user/home.go
Peter Smit 0a4cda0dd4 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
Unknwon 7e7160eefd first pass work on migration
Peter Smit 4e79adf6b5 Refactoring of the Access Table
This commit does a lot of the work of refactoring the access table in a table with id's instead of strings.

The result does compile, but has not been tested. It may eat your kittens.
Unknwon f706102890 models: sanitize user full name when update settings
Unknwon 63c1f9a23f fix 500: E-mail already used in user settings page
Peter Smit 66e2016eeb Fix for wrong email query
Changing EmailAdress.OwnerId to EmailAddress.Uid should have accompanied this change
无闻 a18decf4cc Merge pull request from phsmit/multiple_emails
Multiple emails
Peter 20b5c23a19 Small fixes to multiple_emails feature
Unknwon c4820f119d work on
Peter 6919c80f0b Add function to the model for email address management (add/delete/activate)
Peter Smit 99599c099f Add alternative email addresses to the model
A new struct is created named EmailAddress that contains alternative
email addresses for users. Also the email related methods; IsEmailUsed
and GetUserByEmail are updated.

DeleteUser deletes the extra email addresses and DeleteInactivateUsers
also deletes inactive accounts. This could be factored out, but should
do it for now.
Joseph Crail 39c068400e Fix spelling errors in comments.
Andrew Burns 00cf3e4dab Use the avatar.HashEmail function instead of hashing email directly. Fixes
Unknwon 5338808600 fix
Unknwon d75013a0e8 fix
Unknwon dc53270da9 Fix 653
Unknwon 8ea7ba3afa fix
Unknwon ef275ebf62 more on change avatar
Unknwon 55dfe2c978 custom avatar upload
Unknwon 32dcaefafa fox
Unknwon 340a4595dd support duoshuo mirror of gravatar
Unknwon 9e22840483 fix
Unknwon 0c5ba4573a fix session API broken and SQL pretection
Unknwon 83283bca4c Safe work
Unknwon f1d8746264 Fix fork repo and macaron API broken
Unknwon 963354c5d7 Add raw, history file button, and other mirror fixes
Unknwon 405ee14711 Fix SMTP auth logic
无闻 c1d047d16e Merge pull request from chadoe/homelink
Fix user HomeLink when using a suburl
Martin van Beurden bb05ef907b Fix AvatarLink when using a suburl and gravatar is disabled or avatars are cached
Martin van Beurden 204952439a Fix user HomeLink when using a suburl
Unknwon b8368f98ff Add directory level commit message
Unknwon 71e4689d11 Page: User profile
Unknwon bd55b78775 Page: Commits and fix
Unknwon 5bbeeb0f1b Page: Commits and fix
Unknwon 7ba9257a7f Add suburl support
Martin van Beurden 0055cbd365 Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
Conflicts:
	modules/setting/setting.go

Conflicts:
	templates/repo/release/list.tmpl
	templates/user/dashboard/dashboard.tmpl

Conflicts:
	routers/repo/setting.go
Christopher Brickley f94d7c3f51 clarify name/username/owner/pusher for webhook
Unknwon d2aff9a46a Continue working on new admin pages
Unknwon 1aec1a2dda Finish new admin dashboard
Unknwon 74b31566cf Finsih add/remove repo in organization
Unknwon 21a1b8e5a3 Finish new edit team page, add member to team
Unknwon 36b4c57ff1 Finish new organization members and invitation page
Unknwon 755eec745f Finish new repo settings page
Unknwon 5e81383413 Git installation check, show image in single file view, show short SHA1 instead of 40-length string, complete log module
Unknwon 8dd07c0ddd New UI merge in progress
Justin Nuß cbcd08aa17 Mention organisation users when organisation gets mentioned
Unknown 3969d704a0 Merge branch 'dev' of github.com:gogits/gogs into dev
Unknown 0f907301b7 Fix
Christopher Brickley 63e47405b2 Only update access usernames where the username is changing
Unknown 63cc14062a Paging function for users and repositories
Unknown be8ac7fb75 fix
Unknown 5dbfe3c26c Finish organization homepage
Unknown 6e448b0714 Finish delete organization
Unknown 19e9104289 Organization settings page
Unknown 43b33440b5 Work on create organization repo and
Unknown e0f9c628c5 Add create organization
Unknown ad5ec45dd6 Fix
Unknown f160b4f33c Add tar.gz download button and other mirror updates
Unknown 4f2f3c2857 Code convention
Unknown e1332c5239 Fix
Unknown 688ec6ecbd Fixed
Unknown 80055bde86 Code convention
Unknown 5e9a45f74a Code convention
Unknown 4744996f9a Make gmail auth work
Lunny Xiao 55019bfbc5 merge all login methods
Lunny Xiao 4d6de6c7b9 add login name for auth type
Unknown e05b1385fb Bug fix
Unknown 33d32585b1 Add mention, read/unread support of issue tracker
Unknown 8ca14e2109 Improve delete SSH key
Lunny Xiao d8136c9c3c Merge branch 'dev-ldap' into dev
Lunny Xiao 1652dd5068 basic authentications
Unknown e7d8fadb08 Add disable gravatar option
Unknown a7584d16e4 Fix
Unknown 480a4ae8c5 Fix
Unknown 89c99167b2 Fix
Unknown 49dc57e336 Add /api/v1/users/search
Unknown 62240b6bc1 Add login by email
juju2013 efc05ea1de initial support for LDAP authentication/MSAD
Christopher Brickley b9a1d13c29 change gravatar image to match URL scheme
Unknown 4b9b8024ba Clean oauth code
Unknown 33aa4f7438 Support private repo
Unknown 7d07b58114 UPDATE README
zhsso a4cbe79567 fix
zhsso f3ed11d177 mistakes
Unknown 5d4025cb5a Add go get meta support
Unknown 9ea9818d32 Fix issue with log in with GitHub but need more error handle after
Unknown e7c8a3cb8d Add salt for every single user
Unknown b7c3b0cc73 Add reset password, fix
Unknown e41ab839c7 Use session for rolling back
Unknown eb803ec5eb Add transfer repository
Unknown e9c4156c87 Add: rename user
Unknown 2a0066420a Fix bug work with sqlite3
slene 4c70249f75 fix some link
Unknown ae92f92dee Locating issue
Unknown 59bbddb318 Mirror fix
Unknown f8cfb81fb0 Mirror updates
skyblue 4bac361605 merge with branch master
Unknown 97debac185 SSL enable config option
Gogs 964e537479 append route to web
Unknown 59ffdbf6f8 Add create, list, view issue