Commit Graph

459 Commits

Author SHA1 Message Date
Son NK ab3ce7bd4e fix formatting 2019-12-29 10:33:45 +01:00
doanguyen 3ca5b9628a update `server_default` parameter 2019-12-28 14:20:10 +01:00
doanguyen f3719aa0f0 black formatted 2019-12-28 14:20:10 +01:00
doanguyen 3811bb6880 reformat 2019-12-28 14:20:10 +01:00
doanguyen 4a3b958131 reformat modified files, resolve PR https://github.com/simple-login/app/pull/5 2019-12-28 14:20:10 +01:00
doanguyen 10019ba4eb reverse previous commit 2019-12-28 14:20:10 +01:00
doanguyen d026c596ac remove lambda function from config.py 2019-12-28 14:20:10 +01:00
doanguyen e2e9cc6b5d Implement alias generator schemes 2019-12-28 14:20:10 +01:00
doanguyen 1393b80970 considering lazy loading for non-critical loc 2019-12-28 14:20:10 +01:00
Son NK de0368c20f remove redundant code 2019-12-27 16:53:07 +00:00
Son NK 5b01071bec Redirect user to MFA page if they enable MFA 2019-12-27 16:53:07 +00:00
Son NK c52f2d1603 Create auth/mfa page used by user who has enabled MFA 2019-12-27 16:53:07 +00:00
Son NK fa66a71880 Display MFA setup to user who doesn't have MFA enabled 2019-12-27 16:53:07 +00:00
Son NK e5b10b28a6 Create MFA Setup page if user enable MFA 2019-12-27 16:53:07 +00:00
Son NK 80facfe122 add User.otp_secret, enable_otp column 2019-12-27 16:53:07 +00:00
Son NK 1eefb9228f only parse CLOUDWATCH_LOG_GROUP, CLOUDWATCH_LOG_STREAM if CLOUDWATCH is enabled 2019-12-27 10:39:39 +01:00
Son NK 65d0848e2f show alias in confirmation message 2019-12-26 17:37:51 +00:00
Tung Nguyen 4f751e5cd2 fix typos and improve messages showing at the end users 2019-12-26 13:00:17 +00:00
Son NK e09dfaa481 Fix pricing page message 2019-12-25 21:35:35 +00:00
Son NK ed78e31b8b add custom_domain.dkim_verified column 2019-12-25 17:23:04 +00:00
Son NK f80adae625 fix login error message 2019-12-23 19:00:31 +00:00
Son NK bcbe239f60 User can generate quickly a random alias 2019-12-23 15:34:02 +00:00
Son NK a8d112646e Add hint for alias prefix on custom alias page 2019-12-23 15:09:41 +00:00
Son NK dbbfcac2d6 Still show a readable email name when there's no website_from 2019-12-23 15:09:41 +00:00
Son NK 3320a488f3 refactor s3.py 2019-12-23 15:09:41 +00:00
Son NK a3f547fd22 rename create_custom_alias -> create_new 2019-12-22 16:34:10 +00:00
Son NK 91e38a744b remove GenEmail.custom column 2019-12-22 16:32:55 +00:00
Son NK 8f04f8ae0f rename can_create_new_custom_alias -> can_create_new_alias 2019-12-22 16:27:55 +00:00
Son NK 873133838d delete unused method 2019-12-22 16:21:02 +00:00
Son NK 0955f13593 User can export their data 2019-12-22 16:20:56 +00:00
Son NK 8756241774 Fix wording 2019-12-22 16:03:58 +00:00
Son NK ec4d034593 Add Delete Account in setting 2019-12-22 16:03:40 +00:00
Son NK 17bb01f317 Fix wording 2019-12-22 15:59:41 +00:00
Son NK 41fe528441 use flash to display error in login 2019-12-22 15:59:00 +00:00
Son NK ea1492904a only print out plaintext when NOT_SEND_EMAIL 2019-12-22 15:58:07 +00:00
Son NK 441fc773ba better UI for new alias page 2019-12-22 15:41:37 +00:00
Son NK 6b3fe06efc better UI for custom-alias page 2019-12-22 12:57:19 +00:00
Son NK 8d6988da16 add warning message for social login options. 2019-12-22 08:26:20 +00:00
Son NK 4147e19530 fix facebook error when user choose to not share email 2019-12-19 22:38:20 +02:00
Son NK 4799721667 remove DKIM-Signature if any 2019-12-17 19:06:17 +02:00
Son NK a61b900675 Sign DKIM at app level
- add DKIM_PRIVATE_KEY_PATH param
- create email_utils.add_dkim_signature
- add DKIM signature for transactional emails
- add DKIM signature for forward & reply emails. In reply phase, only non-custom-domain emails have DKIM added.
2019-12-17 18:50:26 +02:00
Son NK f8293bc618 make ADMIN_EMAIL optional 2019-12-16 19:36:59 +02:00
Son NK 66091b4f9e replace ENABLE_SENTRY by SENTRY_DSN 2019-12-16 19:30:17 +02:00
Son NK c3b716f644 remove users.can_use_custom_domain flag 2019-12-15 21:52:24 +02:00
Son NK 1b88d2264e add beta badge for "send email" feature 2019-12-15 18:55:18 +02:00
Son NK a8d00c3329 add tooltip for reverse-alias 2019-12-15 18:55:18 +02:00
Son NK 3e9233f346 replace the "test alias" by the alias manager page 2019-12-15 18:55:18 +02:00
Son NK 231fc6fd88 create alias contact manager page 2019-12-15 18:55:18 +02:00
Son NK 62e0ae27a0 move get_email_name, get_email_part to email_utils 2019-12-15 18:55:18 +02:00
Son NK 88cef1b90d add new param IGNORED_EMAILS and use it in cronjob 2019-12-15 18:55:18 +02:00
Son NK 9c9ad87c7d remove /api/alias/new 2019-12-15 18:55:18 +02:00
Son NK 565d406227 remove new_random_alias related test 2019-12-15 18:55:18 +02:00
Son NK e5079e48da remove can_create_new_random_alias() 2019-12-15 18:55:18 +02:00
Son NK ec62fad3a0 remove notify_admin, replace by general stats 2019-12-15 18:55:18 +02:00
Son NK eba9e889bf add paddle_utils.verify_incoming_request 2019-12-15 18:55:18 +02:00
Son NK d58f9d4c89 add new param PADDLE_PUBLIC_KEY_PATH 2019-12-15 18:55:18 +02:00
Son NK e4ba4297e1 reformat using black 2019-12-15 18:55:18 +02:00
Son NK dc66cf76e2 allow overriding postfix server 2019-12-15 18:55:18 +02:00
Son NK 3d95048e00 fix wording 2019-12-15 18:55:18 +02:00
Son NK 2412658a3e better UI for custom alias page 2019-12-15 18:55:18 +02:00
Son NK 4e6922adad disable late_payment in cron job 2019-12-15 18:55:18 +02:00
Son NK 7f908a9da8 display website_from on alias log 2019-12-15 18:55:18 +02:00
Son NK d160971cc7 add ForwardEmail.website_from field 2019-12-15 18:55:17 +02:00
Son NK 631900ab4f use random_word instead of random_string for alias suffix 2019-12-15 18:55:17 +02:00
Son NK c37ba0e1de website_email: use From header instead of envelope from 2019-12-15 18:55:17 +02:00
Son NK 9dd4a4afb7 take into account NOT_SEND_EMAIL param 2019-12-15 18:55:17 +02:00
Son NK 74fe984ae1 make sure alias pattern check is the same everywhere: Only letter, number, dash (-), underscore (_) can be used in alias prefix 2019-12-15 18:55:17 +02:00
Son NK 260b235328 remove random alias from pricing 2019-12-15 18:55:17 +02:00
Son NK 8e9aef1199 add website_name to suggested_emails 2019-12-15 18:55:17 +02:00
Son NK 779cb9c377 create a custom alias with "my-first-alias" for first time user 2019-12-15 18:55:17 +02:00
Son NK 139fc68bda create some random alias creation 2019-12-15 18:55:17 +02:00
Son NK 8b9a158ac2 create GenEmail.create_custom_alias that should replace all random alias 2019-12-15 18:55:17 +02:00
Son NK b09f74c445 use the same log format for colored log 2019-12-15 18:55:17 +02:00
Son NK 4c8c48bb23 better UI for custom alias page 2019-12-15 18:55:17 +02:00
Son NK 6d21343748 remove create random email button 2019-12-15 18:55:17 +02:00
Son NK 7f6267cc4a call LOG.error on obsolete endpoints: /alias/new and /alias/random/new 2019-12-15 18:55:17 +02:00
Son NK f37a155c1f still return custom alias option when user runs out of custom alias quota 2019-12-15 18:55:17 +02:00
Son NK df3838480d add COLOR_LOG config 2019-12-15 18:55:17 +02:00
Son NK 4caafc7e7b use coloredlogs 2019-12-15 18:55:17 +02:00
Son NK 2e23a1bf19 add RESET_DB back 2019-12-15 18:55:17 +02:00
Son NK d0f95e81b2 fix MX record can be unavailable 2019-12-15 18:55:17 +02:00
Son NK 5854ab8e10 support GET in /oauth/token 2019-12-15 18:55:17 +02:00
Son NK d9c211d8da fix api create new custom alias 2019-12-15 18:55:17 +02:00
Son NK ac9f896a7d improve pricing page 2019-12-15 18:55:17 +02:00
Son NK 3e4e0e931f add separator to highlight alias 2019-12-15 18:55:17 +02:00
Son NK 6723487a23 add SPF check 2019-12-15 18:55:17 +02:00
Son NK 48ff20906e better UI for alias list page 2019-12-15 18:55:17 +02:00
Son NK ca05cd359a remove >3 characters on alias prefix 2019-12-15 18:55:17 +02:00
Son NK 6e387444f5 do not use RESET_DB to avoid potential error: uncomment fake_date locally if necessary 2019-12-15 18:55:17 +02:00
Son NK a5615b22e7 make alias activity responsive 2019-12-15 18:55:17 +02:00
Son NK c3056dc94c use website domain name as alias prefix suggestion (instead of full hostname) 2019-12-15 18:55:17 +02:00
Son NK 28c83107e9 only show intro when screen is big enough to show "developer" tab 2019-12-15 18:55:17 +02:00
Son NK acea37d520 show intro on the first alias 2019-12-15 18:55:16 +02:00
Son NK 39311ab1ff Make dashboard responsive 2019-12-15 18:55:16 +02:00
Son NK ccf93b1235 highlight disable/enable alias 2019-12-15 18:55:16 +02:00
Son NK d4f7b6296d allow alias_prefix shorter 3 characters 2019-12-15 18:55:16 +02:00
Son NK 5b28d70fe0 fix custom alias html 2019-12-15 18:55:16 +02:00
Son NK a9e781da84 use the latest used alias as recommendation 2019-12-15 18:55:16 +02:00
Son NK d58ab8c808 fix create random alias: new alias not saved 2019-12-15 18:55:16 +02:00
Son NK 8250ab2f22 add /alias/custom/new and /alias/random/new 2019-12-15 18:55:16 +02:00
Son NK ab4f5bf329 add /api/alias/options 2019-12-15 18:55:16 +02:00
Son NK c58d9052e7 rename can_create_custom_email -> can_create_new_custom_alias, can_create_new_email -> can_create_new_random_alias 2019-12-15 18:55:16 +02:00
Son NK 6764a4b582 use "default" hostname if hostname is too short 2019-12-15 18:55:16 +02:00
Son NK c012d3686a only premium user can add custom domain 2019-12-15 18:55:16 +02:00
Son NK 3f189163dd notify admin when user creates new custom domain or custom alias associated with custom domain 2019-12-15 18:55:16 +02:00
Son NK 0234af03d3 handle custom domain in custom alias 2019-12-15 18:55:16 +02:00
Son NK 3402d64249 display when a custom domain is created and number of aliases 2019-12-15 18:55:16 +02:00
Son NK 24cb2688ca add gen_email.custom_domain_id foreign key 2019-12-15 18:55:16 +02:00
Son NK a827b27215 add custom_domain view 2019-12-15 18:55:16 +02:00
Son NK 5d9420a763 add EMAIL_SERVERS_WITH_PRIORITY and EMAIL_SERVERS config 2019-12-15 18:55:16 +02:00
Son NK 79a7985221 handle the case where no hostname is provided in /api/alias/new 2019-12-15 18:55:16 +02:00
Son NK b59ffb94b2 Remove Stripe usage 2019-12-15 18:55:16 +02:00
Son NK 40254c54a3 remove stripe columns in User model 2019-12-15 18:55:16 +02:00
Son NK 8471f3a19f add external-link icon when appropriate 2019-12-15 18:55:16 +02:00
Son NK 2b00ceaa6b put extension download link to api-key page 2019-12-15 18:55:16 +02:00
Son NK b514068340 add CustomDomain model 2019-12-15 18:55:16 +02:00
Son NK 975dc7ff21 fix query lost when post 2019-12-15 18:55:16 +02:00
Son NK 6ea43275ed remove user.can_use_api_key 2019-12-15 18:55:16 +02:00
Son NK fd7f819803 allow cross_origin for /api/alias/new 2019-12-15 18:55:16 +02:00
Son NK 786d640511 fix migration 2019-12-15 18:55:16 +02:00
Son NK 7bedd40966 add user.can_use_custom_domain, user.can_use_api_key 2019-12-15 18:55:16 +02:00
Son NK efd0e97ebd prettify api key page 2019-12-15 18:55:16 +02:00
Son NK 4f874eec43 Create API Key page 2019-12-15 18:55:16 +02:00
Son NK 6c4a173de5 create /api/alias/new using api-key as authentication 2019-12-15 18:55:16 +02:00
Son NK 565508689f create AliasUsedOn and ApiKey model 2019-12-15 18:55:16 +02:00
Son NK a5e1a36718 lower case query before search 2019-12-15 18:55:16 +02:00
Son NK b9bce29534 fix search input not large enough on mobile: use col-md-3 instead of col-3 2019-12-15 18:55:16 +02:00
Son NK efd4f40fb7 add autofocus to custom alias 2019-12-15 18:55:16 +02:00
Son NK f611d165c3 autofocus search field 2019-12-15 18:55:16 +02:00
Son NK 28c8fa0f4d add alias search 2019-12-15 18:55:16 +02:00
Son NK e18bbd1cc4 improve wording 2019-12-15 18:55:16 +02:00
Son NK 108b41842e remove user.trial_expiration 2019-12-15 18:55:16 +02:00
Son NK 6e71541985 remove trial concept 2019-12-15 18:55:16 +02:00
Son NK 8dca65678e improve wording 2019-12-15 18:55:15 +02:00
Son NK 5a9d3b0245 alias activity: fix arrow hidden on mobile 2019-12-15 18:55:15 +02:00
Son NK 2ec89afac2 add ADMIN_EMAIL and send notif to this email 2019-12-15 18:55:15 +02:00
Son NK 0717c91a18 improve onboarding 2019-12-15 18:55:15 +02:00
Son NK 019aae24f3 Activation email: use base template, change wording. 2019-12-15 18:55:15 +02:00
Son NK 837e1ffcf6 add List-Unsubscribe-Post header. Block alias directly if POST, otherwise ask user confirmation. 2019-12-15 18:55:15 +02:00
Son NK 45cef7a4ef create unsubscribe view to block quickly an alias 2019-12-15 18:55:15 +02:00
Son NK 34cf72eaee create POSTFIX server 2019-12-15 18:55:15 +02:00
Son NK 38d9654624 fix cancel email change 2019-12-15 18:55:15 +02:00
Son NK 8889dc119f only display profile updated message when something changes 2019-12-15 18:55:15 +02:00
Son NK d061ad7d56 make sure user cannot register with SL email 2019-12-15 18:55:15 +02:00
Son NK 0c85cae6ad handle email change in setting 2019-12-15 18:55:15 +02:00
Son NK 2dd25cc72d create change_email view 2019-12-15 18:55:15 +02:00
Son NK be6266fb0e create change-email email 2019-12-15 18:55:15 +02:00
Son NK 5d52a784f2 add EmailChange model 2019-12-15 18:55:15 +02:00
Son NK e46592019b remove unique constraint on user on deleted_alias table 2019-12-15 18:55:15 +02:00
Son NK 539d87d0a3 make to not reuse alias 2019-12-15 18:55:15 +02:00
Son NK 5c119a933d add DeletedAlias model 2019-12-15 18:55:15 +02:00
Son NK 58504e3b8d display new alias on top 2019-12-15 18:55:15 +02:00
Son NK 711ae83751 show message when logged in user tries goes to register 2019-12-15 18:55:15 +02:00
Son NK a22375e76a improve wording for login & register 2019-12-15 18:55:14 +02:00
Son NK c5b65c108b fix name can be absent in github data
https://sentry.io/organizations/son/issues/1201398007/?project=1478143&query=is%3Aunresolved
2019-12-15 18:55:14 +02:00
Son NK 673b9e72ee show send test and delete buttons 2019-12-15 18:55:14 +02:00
Son NK 64180c4077 do not show email 2019-12-15 18:55:14 +02:00
Son NK 276e37a9ab send welcome email when user creates new account 2019-12-15 18:55:14 +02:00
Son NK 67f7b95c36 add Message-ID and Date header to email 2019-12-15 18:55:14 +02:00
Son NK 3ebb75ca07 Show copy and activity button 2019-12-15 18:55:14 +02:00
Son NK d929cea771 improve dashboard page 2019-12-15 18:55:14 +02:00
Son NK 5b8bc68da1 add alias log page 2019-12-15 18:55:14 +02:00
Son NK 3a920585ce add ForwardEmailLog model 2019-12-15 18:55:14 +02:00
Son NK ec3f2116ff do not show copy button on disabled alias 2019-12-15 18:55:14 +02:00
Son NK 0b9f28970f fix send_test_email_alias 2019-12-15 18:55:14 +02:00
Son NK 6879490557 test email template 2019-12-15 18:55:14 +02:00
Son NK 6f93f419c2 send by postfix only 2019-12-15 18:55:14 +02:00
Son NK 727830be6b improve email wording for test email 2019-12-15 18:55:14 +02:00
Son NK 0ed2ef60c5 remove html marker for test email 2019-12-15 18:55:14 +02:00
Son NK 0a60d01596 use postfix for testing trigger email 2019-12-15 18:55:14 +02:00
Son NK f366e1c383 add send_by_postfix, to distinct with send_by_sendgrid 2019-12-15 18:55:14 +02:00
Son NK 47d5b75dc4 remove partner table 2019-12-15 18:55:14 +02:00
Son NK a084ea880d remove become partner view 2019-12-15 18:55:14 +02:00
Son NK 53df01e54b if user cancels subscription, user is still premium until the next billing_date + 1 2019-12-15 18:55:14 +02:00
Son NK 034605d9ac do not use next_bill_date to know whether user is premium 2019-12-15 18:55:13 +02:00
Son NK 469024179c fix trial_expiration can be None 2019-12-15 18:55:13 +02:00
Son NK 4a56d2eef5 add billing and pricing page 2019-12-15 18:55:13 +02:00
Son NK 6f7c99963b remove pricing2 2019-12-15 18:55:13 +02:00
Son NK 263f68ecec Change subscription model
- create subscription table
- rename plan_expiration -> trial_expiration
- remove user.plan, user.promo_codes
2019-12-15 18:55:13 +02:00
Son NK 1f3239b251 rename pricing to pricing2 to save stripe implementation for reference 2019-12-15 18:55:13 +02:00
Son NK c66f424c51 redirect to ?error=invalid_client_id|http_not_allowed|unknown_redirect_uri instead of return 400 2019-12-15 18:55:13 +02:00
Son NK 61a3844ec4 Add tooltip for email forwarding switch, copy and send test email 2019-12-15 18:55:13 +02:00
Son NK 8f878b4c5d try to make working with postfix outside docker (in host) 2019-12-15 18:55:13 +02:00
Son NK c2546cb0de fix test 2019-12-15 18:55:13 +02:00
Son NK c1ac71abac add forward_email table 2019-12-15 18:55:13 +02:00
Son NK 4231a5691a improve feedback email 2019-12-15 18:55:13 +02:00
Son NK 1fbe8e2d4f if this is the first app user creates, sends an email to ask for feedback 2019-12-15 18:55:13 +02:00
Son NK 62daf5eadb improve notify_admin email 2019-12-15 18:55:13 +02:00
Son NK 1a85ab8dcc use AppID, AppSecret instead of OAuth2 Client ID 2019-12-15 18:55:13 +02:00
Son NK 4c34775aa2 fix cancel button in authorization page when user is not login 2019-12-15 18:55:13 +02:00
Son NK 232d250186 support 127.0.0.1 as well as localhost 2019-12-15 18:55:13 +02:00
Son NK 5eb3f26286 improve UI 2019-12-15 18:55:13 +02:00
Son NK f518085f1a improve wording 2019-12-15 18:55:13 +02:00
Son NK 62c3b4cd02 highlight newly created gen-email 2019-12-15 18:55:12 +02:00
Son NK 3e0bc27bad better notify_admin message 2019-12-15 18:55:12 +02:00
Son NK 9a8282107f avatarURL returned in user_info is expired in 1 week 2019-12-15 18:55:12 +02:00
Son NK 63183b7104 cancel is handled the same way as "deny" 2019-12-15 18:55:12 +02:00
Son NK ef807bf293 Add message to invite user creating a new app 2019-12-15 18:55:12 +02:00
Son NK ed9e3f9085 Show "upgrade" button if user is in trial 2019-12-15 18:55:12 +02:00
Son NK 7cb1c219ed simplify pricing page now that monthly is gone 2019-12-15 18:55:12 +02:00