Commit Graph

141 Commits

Author SHA1 Message Date
Adrià Casajús
f3d47a1eaa
Allow users to keep the original unsub behaviour (#1148)
* Feature: Preserve original unsubscribe request

* Updated tests

* Updated settings

* PR comments

* reduced prefix length

* Include migrate users for new unsub behaviour

* PR comments

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-19 17:25:21 +02:00
Son Nguyen Kim
750b6f9038
distinguish between bounce and quarantine (#1167)
* distinguish between bounce and quarantine

- improve wording
- show bounce or quarantine badge

* prettify
2022-07-19 16:00:02 +02:00
Carlos Quintana
38d305da23
Bypass 2FA if Login with Proton (#1142)
* Bypass 2FA if Login with Proton

* Fix formatting of template
2022-07-04 16:24:49 +02:00
Adrià Casajús
c2bb6488e4
Allow to login with proton to enter sudo mode (#1141)
* Allow to login with proton to enter sudo mode

* Updated wording

* lint

* Only enabled if the user has the account linked

* Add exit-sudo route for tests

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-07-04 16:09:36 +02:00
Adrià Casajús
046748c443
Update pre-commit (#1138)
* Update pre-commit

* Upgrade djlint, remove flake8 and add pylint

* Reformat with new djlint version

* Run pre-commit on CI

* Use only python3.10 on CI

* Reformat files with pre-commit

* Run pre-commit against all files

* Reformat

* Added global excludes

* Added pre-commit to the contributing file

* Set python 3.9 as default

* Set language version to python3

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Carlos Quintana <carlos.quintana@proton.ch>
2022-07-04 16:01:04 +02:00
Son Nguyen Kim
6d86e64d65
show msg on /internal/integrations/proton (#1139)
* show msg on /internal/integrations/proton

* highlight the connect with Proton section

* djlint
2022-07-04 15:39:12 +02:00
Son Nguyen Kim
2f9301eb97
add 14 days mention and use same stats design for alias activity page (#1136)
* add 14 days mention and use same stats design for alias activity page

* djlint
2022-07-04 11:52:34 +02:00
Son Nguyen Kim
93968d00b6
update wording (#1131) 2022-06-30 19:19:22 +02:00
Son Nguyen Kim
44ddd95730
fix coupon page (#1126) 2022-06-29 18:21:49 +02:00
Carlos Quintana
cb7868bdca
Add djlint (#1122)
* Add DJlint configuration

* Initial reformat for djlint

* Add template linting to CI

* Add explanation for HTML template checks in CONTRIBUTING.md
2022-06-29 11:28:26 +02:00
Son Nguyen Kim
75c710a6ab
small refactoring (#1120) 2022-06-28 17:21:23 +02:00
Son Nguyen Kim
89062edc06
show cancel status in "Current plan" section (#1114)
* show cancel status in "Current plan" section

* do not show upgrade button for canceled paddle sub
2022-06-28 11:58:04 +02:00
Carlos Quintana
f58c4a9a50
Show premium subscription managed by partner (#1112) 2022-06-27 13:17:30 +02:00
Adrià Casajús
9cc9d38dce
Propose upgrade proton account for proton partner users without paid mail plan (#1106)
* Propose upgrade proton account for proton partner users without paid mail plan

* Reformat js

* Initial display via jinja

* tweak ui: add a ---OR--- separator

* use collapse to show SL upgrade option

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son <nguyenkims@users.noreply.github.com>
2022-06-23 12:26:02 +02:00
Adrià Casajús
db6ec2dbe6
Fix: Missing renamed methods (#1105)
Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-06-22 15:34:57 +02:00
Carlos Quintana
b4e3c39329
Add Proton logo to buttons (#1091) 2022-06-15 12:06:11 +02:00
Adrià Casajús
efa534fd3e
Store transfer tokens hashed in the db and only allow them to be valid for 24 hours (#1080)
* Store transfer tokens hashed in the db and only allow them to be valid for 30 mins

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
2022-06-13 12:41:47 +02:00
Son Nguyen Kim
91b3e05ed6
improve wording for data export (#1076) 2022-06-13 08:47:36 +02:00
Son Nguyen Kim
a0a92a7562
require user password before transferring an alias (#1070) 2022-06-10 15:50:44 +02:00
Son Nguyen Kim
9cf2f44166
only allow to copy the api key when it is created (#1059)
* show api key created time

* only allow user to copy the api key when it is created

* typo
2022-06-08 10:31:58 +02:00
Son Nguyen Kim
84fcc9ddc4
Notify user cycle email (#1035)
* notify user about a cycle email

* prettify notification detail page
2022-06-07 16:44:57 +02:00
Adrià Casajús
e688f04d6b
Send full user report asynchronously on request (#1029)
* Send full user report asynchronously

* Fix test

* Filter some fields before exporting

* Fix: Domain -> CustomDomain

* format settings html

* not include RefusedEmail as they are not usable by user and are automatically deleted

* send the export to the user email

* change email and setting wording

* fix user can only export data once

* remove alias export section

* remove unused import

* fix flake8

Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
Co-authored-by: Son <nguyenkims@users.noreply.github.com>
2022-06-07 10:45:04 +02:00
Son Nguyen Kim
4a839d9a55
Suggest user to use SL reddit for generic question (#1034) 2022-05-30 09:32:10 +02:00
Son
8ca4daf894 remove the drag and drop mention for now 2022-05-18 18:29:56 +02:00
Adrià Casajús
34ad81c7c0
Merge pull request #921 from simple-login/ac-free-no-reverse-alias
Prevent free users from creating reverse-alias
2022-05-13 17:13:48 +02:00
Adrià Casajús
3a48b30f30
Fix: Sanitize directory name before displaying it to the user 2022-05-13 16:55:45 +02:00
Adrià Casajús
7235de8e73
HTML formatting 2022-05-13 13:02:26 +02:00
Adrià Casajús
0c896100a4
Update html 2022-05-12 18:46:42 +02:00
Adrià Casajús
5dde39eb37
Prevent free users from creating reverse-alias 2022-05-12 13:20:05 +02:00
Son
f3b41279a9 simplify template 2022-05-11 19:12:52 +02:00
Son
7d591baea5 handle case user doesn't have default domain for alias
when user doesn't have default domain for alias, display "Not Selected" to avoid confusion
2022-05-11 19:10:02 +02:00
Carlos Quintana
8d4683e59e
Add login with proton 2022-05-05 12:20:55 +02:00
Son
43a6c87fd6 format some html files using pycharm 2022-04-02 17:36:33 +07:00
Son Nguyen Kim
6a520e110c
Merge pull request #816 from simple-login/feature/include-sender-in-header
Feature/include sender in header
2022-02-28 09:24:18 +01:00
Son
4faf0d7636 optimize dashboard page: load custom domain using joinedload() instead of explicit join 2022-02-26 17:34:53 +01:00
Son
fa95f4273d ui tweak 2022-02-26 16:12:44 +01:00
Adrià Casajús
61d1655529
Move all js to a source file 2022-02-25 14:58:38 +01:00
Son
007aa56551 user can turn on/off the including sender in header option 2022-02-25 12:24:54 +01:00
Adrià Casajús
3d498b4eae
Allow drag and drop of keys into the text area 2022-02-24 18:28:30 +01:00
Son
8fc5fd6d16 improve wording 2022-02-21 16:01:46 +01:00
Carlos Quintana
ee9170bb17
Allow to configure ignore or reject response for blocked contacts 2022-02-21 12:52:21 +01:00
Adrià Casajús
92ec70c497
Show a warning if the user cannot create more aliases 2022-02-15 18:51:13 +01:00
Son
473d0350ca consistent styling 2022-02-14 18:02:09 +01:00
Son
5c0bfe2f34 remove unneeded style 2022-02-14 17:55:27 +01:00
Son
ea00e2ba8f move script block to the end 2022-02-14 17:54:28 +01:00
Son
634ad4ac19 IDE reformatting 2022-02-14 17:54:04 +01:00
Son Nguyen Kim
69c8980c18
Merge pull request #792 from acasajus/new/zendesk-support
Create support tickets via zendesk
2022-02-14 17:53:30 +01:00
Adrià Casajús
305ce38379
PR changes 2022-02-14 11:19:03 +01:00
Adrià Casajús
639d4412e1
Updated comments from PR 2022-02-10 12:47:31 +01:00
Adrià Casajús
c9974d5321
Removed successful ticket created page and replaced with notification 2022-02-10 12:38:56 +01:00
Adrià Casajús
e844c9a392
Removed disabled page and redirected to the normal dashboard 2022-02-10 11:04:36 +01:00
Adrià Casajús
8aee883aae
Updated with more PR comments 2022-02-09 16:41:04 +01:00
Adrià Casajús
95fa95649d
Added comments from PR 2022-02-09 16:20:55 +01:00
Adrià Casajús
e57dcac2d2
Added zendesk submission flow 2022-02-09 12:00:48 +01:00
Adrià Casajús
219d5b998f
Add a suport form to create tickets in zendesk 2022-02-08 22:04:25 +01:00
Son Nguyen Kim
543923b325
Merge pull request #760 from FozzieHi/delete-all-api-keys-button
Add a button to delete all API Keys
2022-02-02 18:31:05 +01:00
Son
5a712f3877 make sure subdomain can only contain lowercase letters, numbers and dashes. 2022-01-26 14:53:27 +01:00
george
285c1d10cf
Move Delete All button to below the list of current API Keys. 2022-01-25 18:36:13 +00:00
Son Nguyen Kim
89a800eed9
Merge pull request #753 from FozzieHi/totp-invalid-login-email
Invalid TOTP and recovery code email notifications
2022-01-24 18:35:52 +01:00
Son
fc3f06f4d8 create notification listing page 2022-01-24 16:45:36 +01:00
Son
1de6fefc59 add notification detail page 2022-01-24 15:22:01 +01:00
george
65531b5c63
Add a button to delete all API Keys. 2022-01-23 18:38:54 +00:00
george
6b4d276ffe
Add change password button with link to dashboard. 2022-01-20 15:40:28 +00:00
Son
4cea47cc27 add setting for include_website_in_one_click_alias 2022-01-12 11:50:49 +01:00
Son
2f6229cd54 change collapse button display "more" -> "less" 2022-01-11 12:25:49 +01:00
Son
ad185ebc3d comment out the ignore-loop-email setting 2022-01-07 16:22:52 +01:00
Son
83be94b43e user can create aliases for domains that don't have mx verified 2021-12-28 12:01:32 +01:00
Son
fc42db43ca add new sender formats: NAME_ONLY, AT_ONLY, NO_NAME 2021-12-28 10:49:37 +01:00
Son
40299cbf34 improve auto create page wording 2021-12-06 18:21:17 +01:00
Son
c878e07c78 add warning message about subdomain quota when creating a new subdomain 2021-12-02 18:13:17 +01:00
Son
57ec92ed7c suggest user to use an email alias during the Paddle checkout 2021-12-01 17:27:29 +01:00
Son
4d388a202c allow user with manual or coinbase subscription to switch to paddle 2021-12-01 17:16:01 +01:00
Son
5dab819ac3 remove BlackFriday mention 2021-12-01 17:06:16 +01:00
Son
34509cbbb3 delete account is protected by password 2021-12-01 10:11:18 +01:00
Son
47f37fae25 Display multiple payment channels 2021-11-29 16:40:13 +01:00
Son
5dbc42a6a7 improve wording to explain what happens if user re-subscribe 2021-11-29 16:38:38 +01:00
Son
57b390733d do not show paid option for lifetime user 2021-11-29 16:27:25 +01:00
Son
c356c75494 show coupon expires date when user buys a coupon 2021-11-26 18:20:46 +01:00
Son
4c33b63f97 better way to know whether this is the last page 2021-11-23 14:44:48 +01:00
Son
64d2e7804e improve wording on custom domain DNS page 2021-11-22 17:22:49 +01:00
Son
55ae61527d user can buy 1-year coupon 2021-11-22 16:30:27 +01:00
Son
bc936436ef explain why deleting a subdomain/directory won't restore the quota 2021-11-20 20:01:36 +01:00
Son
38ecb227b0 reduce subdomain/directory quota when user create/delete subdomain/directory 2021-11-18 10:33:15 +01:00
Son
96f16b658f add coupon code 2021-11-16 14:43:34 +01:00
Son
e24b84f6bf update error message 2021-11-09 11:21:39 +01:00
Son
5105c0dbee limit the number of subdomains 2021-11-09 10:17:47 +01:00
Son
383f633e41 fix active_page 2021-11-05 18:33:14 +01:00
Son
58e92e7462 user can add subdomain 2021-11-05 11:44:39 +01:00
Son
516898af59 move all template files to templates/ 2021-11-04 15:05:22 +01: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