Commit Graph

419 Commits

Author SHA1 Message Date
Son NK
2217805d8c no need to move alias to global trash when a domain is deleted 2020-05-20 10:16:55 +02:00
devStorm
ea914e0378
Rename FIDO->Fido 2020-05-18 13:54:05 -07:00
devStorm
6509053fa8
named key 2020-05-18 02:55:41 -07:00
devStorm
2b8febe0b9
black 2020-05-18 00:06:24 -07:00
devStorm
f2f6e13af7
DB & Setup ready for multi-keys 2020-05-17 22:05:37 -07:00
Sibren Vasse
e905e151ca Create user setting for replacing reverse alias (default: false) 2020-05-17 19:40:46 +02:00
Son NK
12b76dd33b Merge branch 'master' into alias-disable-pgp 2020-05-17 10:46:44 +02:00
Son NK
3f7842ed3e create /recovery_code page 2020-05-17 10:05:55 +02:00
Son NK
aaa1a869ea add RecoveryCode model 2020-05-17 09:59:07 +02:00
Son NK
13bb9810b6 use can disable PGP on an alias 2020-05-16 20:51:07 +02:00
Son NK
95213b6d85 Add alias.disable_pgp column 2020-05-16 20:51:07 +02:00
Sibren Vasse
a5f24e0227 Add more From: sender formatting options 2020-05-16 18:44:31 +02:00
Son NK
aba0a534c0 When a mailbox is deleted, only put alias that has this mailbox as single mailbox to global trash 2020-05-15 16:47:55 +02:00
Son NK
ff1aa72b1d lazy load alias._mailboxes and alias.mailbox 2020-05-15 16:46:02 +02:00
Son NK
0b652cf3f8 remove AliasMailbox.user_id column 2020-05-15 16:35:57 +02:00
Son NK
bc55b98e12 display mailbox that a bounce affects 2020-05-10 20:09:54 +02:00
Son NK
0f09ef681c Add EmailLog.bounced_mailbox_id 2020-05-10 20:09:54 +02:00
Son NK
4b479defa8 Support alias having multiple mailboxes in forward phase 2020-05-10 20:09:54 +02:00
Son NK
684e8983ef Add AliasMailbox table 2020-05-10 20:09:54 +02:00
Son NK
92cd75f14a Add DISABLE_ONBOARDING param 2020-05-10 14:43:41 +02:00
Son NK
7fdef16f37 add SentAlert model to keep track of alert emails sent to user 2020-05-09 20:40:36 +02:00
Son Nguyen Kim
b95d815e5c
Merge pull request #168 from simple-login/global-trash
Global trash
2020-05-09 18:08:51 +02:00
Son Nguyen Kim
e23887bb37
Merge pull request #164 from SibrenVasse/spf
Enforce SPF
2020-05-09 14:37:09 +02:00
Sibren Vasse
001079bdc5 Enforce SPF 2020-05-09 14:15:08 +02:00
Son NK
cf35fe2646 Put all aliases belonging to a domain to global trash when the domain is deleted 2020-05-07 22:50:45 +02:00
Son NK
9898d85722 Put all aliases belonging to a directory to global trash when this directory is deleted 2020-05-07 22:42:39 +02:00
Son NK
7a1f944887 Put all aliases belonging to a mailbox to global trash when this mailbox is deleted 2020-05-07 22:40:53 +02:00
Son NK
0441e5e2a9 Remove DeletedAlias.user_id column 2020-05-07 22:40:30 +02:00
Son NK
2f5a03dcad make sure to add alias into global trash when deleting it 2020-05-07 22:27:27 +02:00
Son NK
300f1d7032 Override Alias.create to check in global trash first 2020-05-07 22:23:36 +02:00
Son NK
f8e896541d replace Mailbox.email unique constraint by (email, user_id) 2020-05-07 21:46:16 +02:00
Son NK
18d62a81d1 add User.can_use_fido 2020-05-07 17:56:25 +02:00
devStorm
f7e3320242
model - fido_enabled 2020-05-07 05:32:52 -07:00
devStorm
286b1143ca
Store sign count 2020-05-05 03:16:52 -07:00
devStorm
a32b69078f
Key registration (Backend) 2020-05-05 01:58:42 -07:00
devStorm
3ce4dfb371
Security key setup page (front-end) 2020-05-05 01:32:49 -07:00
Sibren Vasse
0e4799030d Add default alias name to custom domain 2020-05-03 19:35:02 +02:00
Son NK
a270987f70 Add CustomDomain.dmarc_verified column 2020-05-03 11:51:22 +02:00
Son NK
3ce3a05c7b Add referral name 2020-05-02 18:08:05 +02:00
Son NK
c7ebee2118 Fix suggested_emails: only return enabled aliases 2020-05-02 12:28:44 +02:00
Son NK
22bfb4082e add alias.name column 2020-04-26 10:37:40 +02:00
Son NK
97544ac760 Update mailbox using ajax
refactor: return Mailbox in User.mailboxes()
2020-04-25 13:49:40 +02:00
Son NK
ca6350cc27 optimize import in all files 2020-04-25 13:49:39 +02:00
Son NK
15219f7021 Support Apple grace period 2020-04-20 23:31:25 +02:00
Son NK
04e7cc448e fix blocked -> block 2020-04-20 19:58:10 +02:00
Son NK
b5b4fe2773 make sure original_transaction_id is unique 2020-04-19 23:13:07 +02:00
Son NK
85fd4412ba take into account AppleSubscription in premium formula 2020-04-19 10:58:32 +02:00
Son NK
2a837f9213 remove user.is_cancel() 2020-04-19 10:54:15 +02:00
Son NK
f7f1e7f358 replace user.next_bill_date() by sub.next_bill_date.strftime("%Y-%m-%d") 2020-04-19 10:54:05 +02:00
Son NK
b0118e615a Add AppleSubscription model 2020-04-18 20:47:33 +02:00
Son NK
28101612db Use FIRST_ALIAS_DOMAIN to create first alias 2020-04-15 22:51:18 +02:00
Son NK
29c9295e01 set File.user_id to nullable to correspond to existing installation 2020-04-15 09:00:23 +02:00
Son NK
1410d5617f Fix code compatibility with 2x version 2020-04-14 22:42:20 +02:00
Son NK
ed76a8ae8d reformat 2020-04-13 20:51:29 +02:00
Son NK
b838157ad5 User who has lifetime licence or giveaway manual subscriptions can decide to upgrade to a paid plan 2020-04-13 20:50:48 +02:00
Son NK
260ded14ea rename should_upgrade -> should_show_upgrade_button 2020-04-13 20:49:35 +02:00
Son NK
7beae4d846 Add ManualSubscription.is_giveaway column 2020-04-13 20:48:47 +02:00
Son NK
dee6d4959d Add User.intro_shown column 2020-04-13 13:22:52 +02:00
Son NK
e44860329b Make sure user cannot create more than 50 directories 2020-04-12 20:14:49 +02:00
Son NK
076d9899ea rename 2020-04-12 19:27:14 +02:00
Son NK
a0cdf3ae95 allow user having manual sub or canceled sub to upgrade to lifetime 2020-04-11 10:47:32 +02:00
Son NK
cdf23d04fc Add Referral model 2020-04-09 22:20:06 +02:00
Son NK
5d0519ed86 Add GET /api/v2/aliases 2020-04-06 22:26:35 +02:00
Son NK
460c306712 Order alias by latest activity instead of alias creation date. Show the latest activity & contact 2020-04-05 19:03:17 +02:00
Son NK
afceabeef5 add Contact.new_addr() 2020-04-05 15:21:04 +02:00
Son NK
6c68b3cda7 Fix website_send_to: prefer using name instead of website_from 2020-04-05 12:48:59 +02:00
Son NK
fa8e0aee45 Add contact.name column 2020-04-05 12:18:18 +02:00
Son NK
58ca77e2ae Add browser extension onboarding email 2020-04-02 23:26:17 +02:00
Son NK
9563b706f2 Add EmailLog is_spam, spam_status column 2020-03-30 21:42:25 +02:00
Son NK
65ca7d2a71 add User.use_via_format_for_sender column 2020-03-28 22:35:29 +01:00
Son NK
5b9f3c2763 add contact.is_cc column 2020-03-28 19:05:27 +01:00
Son NK
9e04081186 send mailbox onboarding email 2020-03-24 21:19:45 +01:00
Son NK
c02b8298fc send pgp onboarding email to user on 2nd day 2020-03-24 21:01:38 +01:00
Son NK
86ef7f54d9 RefusedEmail.path can be null 2020-03-22 16:51:21 +01:00
Son NK
8abdf655fc make aliasUsedOn.user_id non nullable 2020-03-20 12:29:37 +01:00
Son NK
92de2102ad Add AliasUsedOn.user_id col 2020-03-20 12:13:00 +01:00
Son NK
783b1937d5 make user_id non nullable on contact, email_log and file 2020-03-20 10:17:52 +01:00
Son NK
cd19997424 Add File.user_id, Contact.user_id, EmailLog.user_id columns 2020-03-20 09:51:15 +01:00
Son Nguyen Kim
44e2e175ef
Merge pull request #115 from simple-login/rename
Rename
2020-03-19 10:39:05 +01:00
Son NK
2d90d35647 rename gen_email_id -> alias_id 2020-03-17 12:01:18 +01:00
Son NK
4f281bdbbb rename GenEmail -> Alias, gen_email to alias whenever possible 2020-03-17 11:51:40 +01:00
Son NK
bea870ef8b rename ForwardEmailLog to EmailLog 2020-03-17 11:10:50 +01:00
Son NK
f2d630e597 rename forward_id to contact_id 2020-03-17 11:05:53 +01:00
Son NK
17974de746 rename ForwardEmail to Contact 2020-03-17 10:56:59 +01:00
Son NK
ea43b8f685 Open PGP to everyone 2020-03-17 09:22:29 +01:00
Son NK
ee1642bf99 use a more consistent format 2020-03-15 23:10:20 +01:00
Son NK
17f3c112b9 do not use formataddr to generate website email 2020-03-15 23:02:06 +01:00
Son NK
6b6fca2281 use email.utils.parseaddr and formataddr instead of get_email_name 2020-03-15 22:29:53 +01:00
Son NK
a923d9ad6a Add refused_email.deleted column 2020-03-15 11:10:37 +01:00
Son NK
0de13ca4d9 add RefusedEmail model 2020-03-14 16:07:34 +01:00
Son NK
d7cb5ed26e GET /api/aliases/:alias_id/contacts 2020-03-14 12:22:43 +01:00
Son NK
1098f17c0c Support note in POST /api/alias/random/new 2020-03-11 12:24:30 +01:00
Son NK
c1c3224a41 Merge branch 'cancel-sub' into staging 2020-03-08 23:13:23 +01:00
Son NK
76e30dfbe8 add User.can_use_pgp column 2020-03-08 13:07:03 +01:00
Son NK
fbb5c0bf93 add pgp_public_key, pgp_finger_print to Mailbox model 2020-03-08 11:55:39 +01:00
Son NK
84f3d7c278 TODO: add next_bill_date check on active subscription next April 2020-03-08 11:36:09 +01:00
Son NK
08e6f89585 increase size on ForwardEmail columns 2020-03-08 11:33:54 +01:00
Son NK
3b454b9a80 fix test 2020-03-05 20:32:08 +01:00
Son NK
a6f4059d5d make sure to set mailbox_id when creating GenEmail 2020-03-05 17:03:07 +01:00
Son NK
faa82e7b5a make GenEmail.mailbox_id non-nullable 2020-03-05 17:00:43 +01:00
Son NK
3492935f95 Canceled user can upgrade again: the payment method is changed immediately though 2020-03-05 09:13:28 +01:00
Son NK
aeed62e95b All users use full-mailbox
- remove can_use_multiple_mailbox col
- remove full_mailbox col
2020-02-29 00:03:35 +07:00
Son NK
7e1119406d New user will have mailbox enabled by default 2020-02-28 22:53:13 +07:00
Son NK
bf3cbd033e add migration script 2020-02-28 19:09:01 +07:00
Son NK
c025acc826 Add AccountActivation model 2020-02-28 19:00:45 +07:00
Son NK
91d5d1c9ac fix test 2020-02-27 22:31:38 +07:00
Son NK
659861198b make salt is nullable 2020-02-27 22:26:19 +07:00
Son NK
7f70dd1678 make User.password nullable, add SocialAuth model 2020-02-27 22:15:22 +07:00
Son NK
c1bd2f83e3 Remind user that their manual sub is ending soon. 2020-02-23 17:01:23 +07:00
Son NK
fb62322794 User who has valid manual sub is premium 2020-02-23 16:31:55 +07:00
Son NK
b2eb084720 Add ManualSubscription model 2020-02-23 16:31:14 +07:00
Son NK
9669c04414 Add user.default_mailbox_id col 2020-02-23 15:40:41 +07:00
Son NK
18a6a50e38 Add Mailbox.new_email col 2020-02-23 14:02:02 +07:00
Son NK
e4bb85ac87 Full-mailbox User can change alias mailbox 2020-02-23 13:58:09 +07:00
Son NK
70802bff17 Create User.mailboxes() 2020-02-23 13:41:27 +07:00
Son NK
f662adf237 Add User.full_mailbox col 2020-02-23 13:39:52 +07:00
Son NK
f80de382fe Prettify alias log 2020-02-22 21:09:07 +07:00
Son NK
0e7a77130c Add ForwardEmailLog.bounced col 2020-02-22 12:53:05 +07:00
Son NK
c5feede87d add User.can_use_multiple_mailbox column 2020-02-11 22:42:51 +07:00
Son NK
fc167b8b41 Display alias mailbox on alias page 2020-02-10 23:23:02 +07:00
Son NK
eca2422be4 Add Mailbox model, GenEmail.mailbox_id column 2020-02-10 23:11:09 +07:00
Son NK
ebadcfb175 add GenEmail.note column 2020-02-05 15:45:29 +07:00
Son NK
0f4e803639 WIP send user onboarding email 1day after the account creation 2020-02-03 13:28:08 +07:00
Son NK
ffee8757ea add Job model 2020-02-03 13:09:48 +07:00
Son NK
c649e3ba09 small fix 2020-01-30 15:08:26 +07:00
Son NK
ad1cf3af8c fix test 2020-01-30 13:20:32 +07:00
Son NK
2ca97368f8 Handle trial period
- user can upgrade to lifetime if in trial or free
- free or trial user can buy a subscription
- user has all features when in trial
2020-01-30 10:53:17 +07:00
Son NK
354e5f9a67 add User.trial_end column 2020-01-30 10:10:28 +07:00
Son NK
813d801ba6 use 256 varchar for email fields 2020-01-26 23:22:16 +07:00
Son NK
3f0aae6f02 send email notifying user that alias creation works only in premium plan 2020-01-16 22:06:36 +01:00
Son NK
5a57e3bc44 Add Directory model and add directory_id column to GenEmail 2020-01-08 21:23:41 +01:00
Son NK
dc53d77a71 User is premium if they have lifetime deal 2020-01-01 20:02:48 +01:00
Son NK
98d2882719 Add LifetimeCoupon model and User.lifetime column 2020-01-01 20:02:30 +01:00
Son NK
026fe4addd get_subscription should only return *active* subscription. 2020-01-01 19:46:35 +01:00
Son Nguyen Kim
d63faa8ab3
Merge pull request #13 from simple-login/catch-all
Catch all
2019-12-30 22:18:54 +01:00
Son NK
174ee174f9 add gen_email.automatic_creation column 2019-12-30 18:48:07 +01:00
Son NK
b9908a16b2 add get_email_local_part(), get_email_domain_part() to email_utils 2019-12-30 18:18:10 +01:00
Son NK
cae43fa0dd add custom_domain.catch_all column 2019-12-30 18:17:45 +01:00
doanguyen
3e766f8126 blacked-again 2019-12-30 00:47:55 +01:00
doanguyen
4b3453dce8 Lol, str(True) != 1 2019-12-30 00:39:47 +01:00
doanguyen
c194ee3337 blacked 2019-12-30 00:37:07 +01:00
doanguyen
84eb10232c notification setting 2019-12-30 00:33:59 +01:00
Son NK
34faafe25e add custom_domain.spf_verified column 2019-12-29 10:46:00 +01:00
doanguyen
3ca5b9628a update server_default parameter 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
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
80facfe122 add User.otp_secret, enable_otp column 2019-12-27 16:53:07 +00:00
Son NK
ed78e31b8b add custom_domain.dkim_verified column 2019-12-25 17:23:04 +00:00
Son NK
bcbe239f60 User can generate quickly a random alias 2019-12-23 15:34:02 +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
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
c3b716f644 remove users.can_use_custom_domain flag 2019-12-15 21:52:24 +02:00
Son NK
231fc6fd88 create alias contact manager page 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
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
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
8b9a158ac2 create GenEmail.create_custom_alias that should replace all random alias 2019-12-15 18:55:17 +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
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
40254c54a3 remove stripe columns in User model 2019-12-15 18:55:16 +02:00
Son NK
b514068340 add CustomDomain model 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
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
565508689f create AliasUsedOn and ApiKey model 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
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
3a920585ce add ForwardEmailLog model 2019-12-15 18:55:14 +02:00
Son NK
47d5b75dc4 remove partner table 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
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
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
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
ed9e3f9085 Show "upgrade" button if user is in trial 2019-12-15 18:55:12 +02:00
Son NK
5ff317538c remove monthly pricing, display 20$ for monthly pricing 2019-12-15 18:55:12 +02:00
Son NK
2693ba5838 make sure expiration is handled for ActivationCode and ResetPasswordCode 2019-12-15 18:55:12 +02:00
Son NK
4704ca0bc6 add expired column to AuthCode and OAuthToken 2019-12-15 18:55:12 +02:00
Son NK
05dc03ef8a use card layout for app list, 2019-12-15 18:55:12 +02:00
Son NK
28d475ea22 better avatar pic: use name initial as avatar 2019-12-15 18:55:12 +02:00
Son NK
e563dff496 add response_type to AuthCode and OauthToken model 2019-12-15 18:55:11 +02:00
Son NK
47109e6011 add "sub", fix test 2019-12-15 18:55:11 +02:00
Son NK
bde3edaf56 remove User.is_developer column 2019-12-15 18:55:10 +02:00
Son NK
67dbcb9723 user can choose their avatar to send 2019-12-15 18:55:10 +02:00
Son NK
d61c402aea user can choose name 2019-12-15 18:55:10 +02:00
Son NK
ddf188f146 add ClientUser.name,default_avatar, GenEmail.custom column 2019-12-15 18:55:10 +02:00
Son NK
08b394ea0f add User.suggested_emails 2019-12-15 18:55:10 +02:00
Son NK
d05749d577 add default-avatar and use it instead of gravatar 2019-12-15 18:55:10 +02:00
Son NK
2fc3108141 fix test 2019-12-15 18:55:09 +02:00
Son NK
0817e45abe override User.create to set password, create GenEmail, set trial period 2019-12-15 18:55:09 +02:00
Son NK
4227c3036d fix reset password expired 2019-12-15 18:55:09 +02:00
Son NK
17a4679b90 fix activation code 2019-12-15 18:55:09 +02:00
Son NK
388f520e9a premium user can choose custom alias 2019-12-15 18:55:08 +02:00
Son NK
1274dd589a add delete() to ModelMixin: do NOT use the session.delete(), somehow it does a "SET" before "DELETE" 2019-12-15 18:55:08 +02:00
Son NK
1703f4b5f6 add param WORDS_FILE_PATH, use random_words when generating email 2019-12-15 18:55:08 +02:00
Son NK
9f3cba61ca rename ScopeE to just Scope 2019-12-15 18:55:08 +02:00
Son NK
aa99ccb094 remove table scope and client_scope 2019-12-15 18:55:08 +02:00
Son NK
2a59bf5e23 add AVATAR_URL scope, use ScopeE instead of Scope 2019-12-15 18:55:08 +02:00
Son NK
c18d9f5280 create BaseForm to enable CSRF
register page

redirect user to dashboard if they are logged in

enable csrf for login page

Set models more strict

bootstrap developer page

add helper method to ModelMixin, remove CRUDMixin

display list of clients on developer index, add copy client-secret to clipboard using clipboardjs

add toastr and use jquery non slim

display a toast when user copies the client-secret

create new client, generate client-id using unidecode

client detail page: can edit client

add delete client

implement /oauth/authorize and /oauth/allow-deny

implement /oauth/token

add /oauth/user_info endpoint

handle scopes: wip

take into account scope: display scope, return user data according to scope

create virtual-domain, gen email, client_user model WIP

create authorize_nonlogin_user page

user can choose to generate a new email

no need to interfere with root logger

log for before and after request

if user has already allowed a client: generate a auth-code and redirect user to client

get_user_info takes into account gen email

display list of clients that have user has authorised

use yk-client domain instead of localhost as cookie depends on the domain name

use wtforms instead of flask_wtf

Dockerfile

delete virtual domain

EMAIL_DOMAIN can come from env var

bind to host 0.0.0.0

fix signup error: use session as default csrf_context

rename yourkey to simplelogin

add python-dotenv, ipython, sqlalchemy_utils

create DB_URI, FLASK_SECRET. Load config from CONFIG file if exist

add shortcuts to logging

create shell

add psycopg2

do not add local data in Dockerfile

add drop_db into shell

add shell.prepare_db()

fix prepare_db

setup sentry

copy assets from tabler/dist

add icon downloaded from https://commons.wikimedia.org/wiki/File:Simpleicons_Interface_key-tool-1.svg

integrate tabler - login and register page

add favicon

template: default, header. Use gravatar for user avatar url

use default template for dashboard, developer page

use another icon

add clipboard and notie

prettify dashboard

add notie css

add fake gen email and client-user

prettify list client page, use notie for toast

add email, name scope to new client

display client scope in client list

prettify new-client, client-detail

add sentry-sdk and blinker

add arrow, add dt jinja filter, prettify logout, dashboard

comment "last used" in dashboard for now

prettify date display

add copy email to clipboard to dashboard

use "users" as table name for User as "user" is reserved key in postgres

call prepare_db() when creating new db

error page 400, 401, 403, 404

prettify authorize_login_user

create already_authorize.html for user who has already authorized a client

user can generate new email

display all other generated emails

add ENV variable, only reset DB when ENV=local

fix: not return other users gen emails

display nb users for each client

refactor shell: remove prepare_db()

add sendgrid

add /favicon.ico route

add new config: URL, SUPPORT_EMAIL, SENDGRID_API_KEY

user needs to activate their account before login

create copy button on dashboard

client can have multiple redirect uris, in client detail can add/remove redirect-uri,

use redirect_uri passed in /authorize

refactor: move get_user_info into ClientUser model

dashboard: display all apps, all generated emails

add "id" into user_info

add trigger email button

invalidate the session at each new version by changing the secret

centralize Client creation into Client.create_new

user can enable/disable email forwarding

setup auto dismiss alert: just add .alert-auto-dismiss

move name down in register form

add shell.add_real_data

move blueprint template to its own package

prettify authorize page for non-authenticated user

update readme, return error if not redirect_uri

add flask-wtf, use psycopg2-binary

use flask-wtf FlaskForm instead of Form

rename email -> email_utils

add AWS_REGION, BUCKET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY to config

add s3 module

add File model, add Client.icon_id

handle client icon update

can create client with icon

display client icon in client list page

add Client.home_url

take into account Client.home_url

add boto3

register: ask name first

only show "trigger test email" if email forwarding is enabled

display gen email in alphabetical order, client in client.name alphabetical order

better error page

the modal does not get close when user clicks outside of modal

add Client.published column

discover page that displays all published Client

add missing bootstrap.bundle.min.js.map

developer can publish/unpublish their app in discover

use notie for display flash message

create hotmail account

fix missing jquery

add footer, add global jinja2 variable

strengthen model: use nullable=False whenever possible,

rename client_id to oauth_client_id, client_secret to oauth_client_secret

add flask-migrate

init migrate

1st migrate version

fix rename client_id -> oauth_client_id

prettify UI

use flask_migrate.upgrade() instead of db.create_all()

make sure requirejs.config is called for all page

enable sentry for js, use uppercase for global jinja2 variables

add flask-admin

add User.is_admin column

setup flask admin, only accessible to admin user

fix migration: add server_default

replace session[redirect_after_login] by "next" request args

add pyproject.toml: ignore migrations/ in black

add register waiting_activation_email page

better email wording

add pytest

add get_host_name_and_scheme and tests

example fail test

fix test

fix client-id display

add flask-cors

/user_info supports cors, add /me as /user_info synonym

return client in /me

support implicit flow

no need to use with "app.app_context()"

add watchtower to requirement

add param ENABLE_CLOUDWATCH, CLOUDWATCH_LOG_GROUP, CLOUDWATCH_LOG_STREAM

add cloudwatch logger if cloudwatch is enabled

add 500 error page

add help text for list of used client

display list of app/website that an email has been used

click on client name brings to client detail page

create style.css to add additional style, append its url with the current sha1 to avoid cache

POC on how to send email using postfix

add sqlalchemy-utils

use arrow instead of datetime

add new params STRIPE_API, STRIPE_YEARLY_SKU, STRIPE_MONTHLY_PLAN

show full error in local

add plan, plan_expiration to User, need to create enum directly in migration script, cf https://github.com/sqlalchemy/alembic/issues/67

reformat all html files: use space instead of tab

new user will have trial plan for 15 days

add new param MAX_NB_EMAIL_FREE_PLAN

only user with enough quota can create new email

if user cannot create new gen email, pick randomly one from existing gen emails. Use flush instead of commit

rename STRIPE_YEARLY_SKU -> STRIPE_YEARLY_PLAN

open client page in discover in a new tab

add stripe

not logging /static call: disable flask logging, replace by after_request

add param STRIPE_SECRET_KEY

add 3 columns stripe_customer_id, stripe_card_token, stripe_subscription_id

user can upgrade their pricing

add setting page as coming-soon

add GenEmail, ClientUser to admin

ignore /admin/static logging

add more fake data

add ondelete="cascade" whenever possible

rename plan_expiration -> trial_expiration

reset migration: delete old migrations, create new one

rename test_send_email -> poc_send_email to avoid the file being called by pytest

add new param LYRA_ANALYTICS_ID, add lyra analytics

add how to create new migration into readme

add drift to base.html

notify admin when new user signs up or pays subscription

log exception in case of 500

use sendgrid to notify admin

add alias /userinfo to user_info endpoint

add change_password to shell

add info on how payment is handled

invite user to retry if card not working

remove drift and add "contact us" link

move poc_send_email into poc/

support getting client-id, client-secret from form-data in addition to basic auth

client-id, client-secret is passed in form-data by passport-oauth2 for ex

add jwtRS256 private and public key

add jwk-jws-jwt poc

add new param OPENID_PRIVATE_KEY_PATH, OPENID_PRIVATE_KEY_PATH

add scope, redirect_url to AuthorizationCode and OauthToken

take into scope when creating oauth-token, authorization-code

add jwcrypto

add jose_utils: make_id_token and verify_id_token

add &scope to redirect uri

add "email_verified": True into user_info

fix user not activated

add /oauth2 as alias for /oauth

handle case where scope and state are empty

remove threaded=False

Use Email Alias as wording

remove help text

user can re-send activation email

add "expired" into ActivationCode

Handle the case activation code is expired

reformat: use form.validate_on_submit instead of request.method == post && form.validate

use error text instead of flash()

display client oauth-id and oauth-secret on client detail page

not display oauth-secret on client listing

fix expiration check

improve page title, footer

add /jwks and /.well-known/openid-configuration

init properly tests, fix blueprint conflict bug in flask-admin

create oauth_models module

rename Scope -> ScopeE to distinguish with Scope DB model

set app.url_map.strict_slashes = False

use ScopeE instead of SCOPE_NAME, ...

support access_token passed as args in /userinfo

merge /allow-deny into /authorize

improve wording

take into account the case response_type=code and openid is in scope

take into account response_type=id_token, id_token token, id_token code

make sure to use in-memory db in test

fix scope can be null

allow cross_origin for /.well-known/openid-configuration and /jwks

fix footer link

center authorize form

rename trial_expiration to plan_expiration

move stripe init to create_app()

use real email to be able to receive email notification

add user.profile_picture_id column

use user profile picture and fallback to gravatar

use nguyenkims+local@gm to distinguish with staging

handle plan cancel, reactivation, user profile update

fix can_create_new_email

create cron.py that set plan to free when expired

add crontab.yml

add yacron

use notify_admin instead of LOG.error

add ResetPasswordCode model

user can change password in setting

increase display time for notie

add forgot_password page

If login error: redirect to this page upon success login.

hide discover tab

add column user.is_developer

only show developer menu to developer

comment out the publish button

set local user to developer

make sure only developer can access /developer blueprint

User is invited to upgrade if they are in free plan or their trial ends soon

not sending email when in local mode

create Partner model

create become partner page

use normal error handling on local

fix migration

add "import sqlalchemy_utils" into migration template

small refactoring on setting page

handle promo code. TODO: add migration file

add migration for user.promo_codes

move email alias on top of apps in dashboard

add introjs

move encode_url to utils

create GenEmail.create_new_gen_email

create a first alias mail to show user how to use when they login

show intro when user visits the website the first time

fix register
2019-07-02 10:20:12 +03:00
Son NK
0b3dd21a06 bootstrap: db models, login, logout, dashboard pages 2019-07-01 18:18:12 +03:00