summaryrefslogtreecommitdiffstats
path: root/routers/user/setting.go
Commit message (Collapse)AuthorAgeFilesLines
* Splitted the user settings code into several files to be more maintainable ↵David Schneiderbauer2018-05-171-808/+0
| | | | | | | | | | | | | | | | | (#3968) * refactor setting router code splitted up one huge router settings file into the smaller files representing the actual page structure * move code to subfolder * rename functions * renamed files * add copyright information
* Refactor User Settings (#3900)David Schneiderbauer2018-05-151-197/+182
| | | | | | | | | | | | | | | | | | | | | | * moved avatar to profile page * combined password change, email and account deletion into account settings page * combined totp, access tokens, linked accounts and openid into security settings page * move access tokens to applications settings page * small change to restart drone build * fix change avatar url on profile page * redirect old settings urls to new ones * enforce only one autofocus attribute on settings pages * set correct redirect status code * fmt fix
* Added user language setting (#3875)kolaente2018-05-051-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added user language setting * Added translation string for setting * Fixed import order + typo * improved checking if the user has a language saved in the db * The current saved language is now set a default inside the dropdown * fmt * When a user signs in and doesn't have a language saved, the current browser language is saved * updated gitea-sdk * Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language # Conflicts: # models/migrations/migrations.go # models/migrations/v62.go * Made tests work again * trigger CI * trigger CI * fmt * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO * When loggin in, only the language col gets updated instead of everything
* Fix missing translations when updating username. (#3564)bugreport02018-02-251-3/+3
| | | | | | | | * Fix missing translations when updating username. * Fix reserved username translated string test. * Fix 'username reserved' string test a bit more.
* Cleanup models.User.HashPassword (#3334)Kim "BKC" Carlbäcker2018-01-121-2/+1
|
* Handle refactor (#3339)Morgan Bazalgette2018-01-101-41/+41
| | | | | | * Replace all ctx.Handle with ctx.ServerError or ctx.NotFound * Change Handle(403) to NotFound, avoid using macaron's NotFound
* Change EncodePasswd to HashPassword (#3329)Morgan Bazalgette2018-01-081-1/+1
| | | | | | * Change EncodePasswd to HashPassword * Create test+benchmark for HashPassword
* Fix missing password length check when change password (#3039)Lunny Xiao2017-12-021-1/+3
| | | | | | * fix missing password length check when change password * add tests for change password
* remove unused variable (#3038)Lunny Xiao2017-11-301-1/+0
|
* Disable add key button if SSH is disabled (#2873)Michael Kuhn2017-11-211-3/+6
|
* Merge password and 2fa page on user settings (#2695)Lunny Xiao2017-10-161-37/+30
| | | * merge password and 2fa page on user settings
* Implementation of all repositories of a user from user->settings (#1740)Rémy Boulanouar2017-09-141-0/+35
| | | | | | | | | | | | * Implementation of all repositories of a user from user->settings * Update message when no repository found * Update according to comments * Change UI to have a better look * improved user repositories UI
* Only check at least one email gpg key (#2266)Antoine GIRARD2017-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | * Only require one email (possibly not yet validated) * Update message error and check validation of commit * Add integrations tests * Complete integration for import * Add pre-check/optimization * Add some test (not finished) * Finish * Fix fixtures * Fix typo * Don't guess key ID
* Add AppURL without trailing slash to TOTP issuer parameter to prevent ↵David Schneiderbauer2017-08-191-1/+1
| | | | | conflicting accounts on multiple gitea installations (#2335) Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
* Only update needed columns when update user (#2296)Lunny Xiao2017-08-121-2/+2
| | | | | | * only update needed columns when update user * fix missing update_unix column
* Make time diff translatable (#2057)Lauris BH2017-06-281-1/+1
|
* feat: add check misspelling (#1877)Bo-Yi Wu2017-06-051-1/+1
|
* Display all organization from user settings (#1739)Rémy Boulanouar2017-06-021-0/+14
| | | | | | | | | | | | | | * Display all organization from user settings * fix Tab selection * Update locale_en-US.ini * Add a condition for display Create organization button * Remove french translation * Remove unnecessary admin flag
* xxx_active_code_live setting in printed in hours and minutes instead … (#1814)Jonas Östanbäck2017-05-291-1/+1
| | | | | | * xxx_active_code_live setting in printed in hours and minutes instead of just hours * Update app.ini description of xxx_code_lives settings
* Rework SSH key management UI to add GPG (#1293)Antoine GIRARD2017-04-261-40/+93
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Show a link to password reset from password change and delete account (#862)Sandro Santilli2017-03-111-0/+3
| | | | | | | It's helpful when you forgot your password thus cannot change it (can happen if you log in via OAuth2 or OpenID) Also make sure that both the delete-account and password-change links to forgot-password will have the primary email pre-filled
* fix #13 (#1042)Lunny Xiao2017-02-251-1/+1
|
* fix 500 when change user setting email to an exist email (#1039)Lunny Xiao2017-02-251-0/+5
|
* Oauth2 consumer (#679)Willem van Dreumel2017-02-221-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | * 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)
* Two factor authentication support (#630)Andrew2017-01-161-0/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | * Initial commit for 2FA support Signed-off-by: Andrew <write@imaginarycode.com> * Add vendored files * Add missing depends * A few clean ups * Added improvements, proper encryption * Better encryption key * Simplify "key" generation * Make 2FA enrollment page more robust * Fix typo * Rename twofa/2FA to TwoFactor * UNIQUE INDEX -> UNIQUE
* Add Keep email private (see issue #571). (#571)derSuessmann2017-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Notifications - Step 2Andrey Nering2016-12-301-1/+0
|
* Fix random string generator (#384)Denis Denisov2016-12-201-1/+5
| | | | | | | | | | | * 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
* fixed vulnerabilities (#392)Lunny Xiao2016-12-151-2/+2
|
* Fixes typosBwko2016-11-271-1/+1
|
* Golint fixed for modules/setting (#262)Lunny Xiao2016-11-271-19/+19
| | | | | | * golint fixed for modules/setting * typo fixed and renamed UNIXSOCKET to UnixSocket
* golint fixed for parts of routers root, dev, user and org dirs (#167)Lunny Xiao2016-11-181-26/+44
| | | | | | | | * golint fixed for parts of routers root, dev and org dirs * add user/auth.go golint fixed * rename unnecessary exported to unexported and user dir golint fixed
* Update import paths from github.com/go-gitea to code.gitea.io (#135)Sandro Santilli2016-11-101-6/+6
| | | | | | | - 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
* moreSandro Santilli2016-11-071-1/+1
|
* Change import reference to match gitea instead of gogs (#37)Rémy Boulanouar2016-11-031-6/+6
|
* router/repo: code refactoringUnknwon2016-08-301-1/+1
|
* Add support for federated avatars (#3320)Sandro Santilli2016-08-071-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Refactor User.Id to User.IDUnknwon2016-07-241-10/+10
|
* #2854 fix no mail notification when issue is closed/reopenedUnknwon2016-07-161-7/+6
|
* Rename module: middleware -> contextUnknwon2016-03-111-19/+19
|
* Added: Ability to delete org avatar.Tamás Molnár2016-03-061-6/+3
|
* #1157 some avatar setting changesUnknwon2016-03-051-9/+27
| | | | - Allow to delete current avatar
* #1692 add user email APIsUnknwon2015-12-151-1/+1
|
* #2154 minor fixUnknwon2015-12-111-1/+1
|
* #2154 fix form submit errorUnknwon2015-12-111-14/+25
|
* #2154 disable change user for non-local usersUnknwon2015-12-111-2/+4
| | | | - #2153 remove require for gravatar
* fix #976Unknwon2015-12-031-2/+2
|
* fix #2020Unknwon2015-11-241-1/+1
|
* fix #878Unknwon2015-11-181-1/+1
|
* fix #981Unknwon2015-09-171-2/+4
|