gitea/models
Chris Shyi d025d84d91
Add email validity check (#13475)
* Improve error feedback for duplicate deploy keys

Instead of a generic HTTP 500 error page, a flash message is rendered
with the deploy key page template so inform the user that a key with the
intended title already exists.

* API returns 422 error when key with name exists

* Add email validity checking

Add email validity checking for the following routes:
[Web interface]
1. User registration
2. User creation by admin
3. Adding an email through user settings
[API]
1. POST /admin/users
2. PATCH /admin/users/:username
3. POST /user/emails

* Add further tests

* Add signup email tests

* Add email validity check for linking existing account

* Address PR comments

* Remove unneeded DB session

* Move email check to updateUser

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2020-11-14 11:53:43 -05:00
..
fixtures [RFC] Make archival asynchronous (#11296) 2020-11-07 22:27:28 +02:00
migrations Include OriginalAuthor in Reaction constraint (#13505) 2020-11-10 22:37:11 +00:00
access_test.go
access.go
action_list.go
action_test.go
action.go
admin_test.go
admin.go
attachment_test.go
attachment.go
avatar.go
branches_test.go
branches.go
commit_status_test.go
commit_status.go
consistency.go
context.go
convert.go
error_oauth2.go
error.go Add email validity check (#13475) 2020-11-14 11:53:43 -05:00
external_login_user.go
fixture_generation.go
fixture_test.go
gpg_key_test.go
gpg_key.go
helper_directory.go
helper_environment.go
helper.go
issue_assignees_test.go
issue_assignees.go
issue_comment_list.go
issue_comment_test.go
issue_comment.go Comments on review should have the same sha (#13448) 2020-11-09 01:15:09 -05:00
issue_dependency_test.go
issue_dependency.go
issue_label_test.go
issue_label.go
issue_list_test.go
issue_list.go
issue_lock.go
issue_milestone_test.go
issue_milestone.go
issue_reaction_test.go
issue_reaction.go Include OriginalAuthor in Reaction constraint (#13505) 2020-11-10 22:37:11 +00:00
issue_stopwatch_test.go
issue_stopwatch.go
issue_test.go
issue_tracked_time_test.go
issue_tracked_time.go
issue_user_test.go
issue_user.go
issue_watch_test.go
issue_watch.go
issue_xref_test.go
issue_xref.go
issue.go
lfs_lock.go
lfs.go
list_options.go
log.go Refactor Logger (#13294) 2020-10-31 01:36:46 -04:00
login_source.go
main_test.go
migrate.go
models_test.go
models.go
notification_test.go
notification.go
oauth2_application_test.go
oauth2_application.go
oauth2.go #12897 - add mastodon provider (#13293) 2020-10-25 14:21:49 -04:00
org_team_test.go
org_team.go
org_test.go
org.go
project_board.go
project_issue.go
project_test.go
project.go
pull_list.go
pull_sign.go
pull_test.go
pull.go
release.go Add the tag list page to the release page (#12096) 2020-11-02 18:10:22 -05:00
repo_activity.go
repo_avatar.go
repo_branch.go
repo_collaboration_test.go
repo_collaboration.go
repo_generate_test.go
repo_generate.go
repo_indexer.go
repo_issue.go
repo_language_stats.go
repo_list_test.go [RFC] Make archival asynchronous (#11296) 2020-11-07 22:27:28 +02:00
repo_list.go
repo_mirror.go
repo_permission_test.go
repo_permission.go
repo_redirect_test.go
repo_redirect.go
repo_sign.go
repo_test.go
repo_unit.go
repo_watch_test.go
repo_watch.go
repo.go updateSize when create a repo with init commit (#13441) 2020-11-06 23:44:08 -05:00
review_test.go
review.go
ssh_key_test.go
ssh_key.go don't append key file if asked not to (#13368) 2020-10-31 20:57:41 -04:00
star_test.go
star.go
task.go Store task errors following migrations and display them (#13246) 2020-10-23 19:46:35 -04:00
test_fixtures.go
token_test.go
token.go
topic_test.go
topic.go Ensure topics added using the API are added to the repository (#13285) 2020-10-24 15:11:30 +01:00
twofactor.go
u2f_test.go
u2f.go
unit_tests.go
unit.go
update.go
upload.go
user_avatar.go Avatar autogeneration fixed (#13233) 2020-10-23 20:55:10 +03:00
user_follow_test.go
user_follow.go
user_heatmap_test.go
user_heatmap.go
user_mail_test.go
user_mail.go Add email validity check (#13475) 2020-11-14 11:53:43 -05:00
user_openid_test.go
user_openid.go
user_test.go Add email validity check (#13475) 2020-11-14 11:53:43 -05:00
user.go Add email validity check (#13475) 2020-11-14 11:53:43 -05:00
userlist_test.go
userlist.go
webhook_test.go
webhook.go
wiki_test.go
wiki.go