diff --git a/README.md b/README.md index b6ea063a..52383326 100644 --- a/README.md +++ b/README.md @@ -1043,6 +1043,7 @@ Input: - (optional) `mailbox_id` in request body - (optional) `name` in request body - (optional) `mailbox_ids` in request body: array of mailbox_id +- (optional) `disable_pgp` in request body: boolean Output: If success, return 200 diff --git a/app/api/views/alias.py b/app/api/views/alias.py index db7cb9ac..cb11f375 100644 --- a/app/api/views/alias.py +++ b/app/api/views/alias.py @@ -257,6 +257,7 @@ def update_alias(alias_id): note (optional): in body name (optional): in body mailbox_id (optional): in body + disable_pgp (optional): in body Output: 200 """ @@ -319,6 +320,10 @@ def update_alias(alias_id): alias.name = new_name changed = True + if "disable_pgp" in data: + alias.disable_pgp = data.get("disable_pgp") + changed = True + if changed: db.session.commit() diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index c90ba35c..e6b0d32a 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -211,7 +211,7 @@ {% endif %} style="padding-left: 0px" > - @@ -372,10 +372,26 @@ Save - - + {% if alias.mailbox_support_pgp() %} +