From 362032b80371e7e9d49e5f98ed120007c0c4512d Mon Sep 17 00:00:00 2001 From: Son NK Date: Sun, 23 Feb 2020 14:09:57 +0700 Subject: [PATCH] full_mailbox user can use mailbox --- app/dashboard/views/mailbox.py | 2 +- templates/menu.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dashboard/views/mailbox.py b/app/dashboard/views/mailbox.py index 33cc9b55..5ce2ed5e 100644 --- a/app/dashboard/views/mailbox.py +++ b/app/dashboard/views/mailbox.py @@ -27,7 +27,7 @@ class NewMailboxForm(FlaskForm): @dashboard_bp.route("/mailbox", methods=["GET", "POST"]) @login_required def mailbox_route(): - if not current_user.can_use_multiple_mailbox: + if not current_user.can_use_multiple_mailbox and not current_user.full_mailbox: flash("You don't have access to this page, redirect to home page", "warning") return redirect(url_for("dashboard.index")) diff --git a/templates/menu.html b/templates/menu.html index 5a6a8191..2d5dcfe5 100644 --- a/templates/menu.html +++ b/templates/menu.html @@ -29,7 +29,7 @@ - {% if current_user.can_use_multiple_mailbox %} + {% if current_user.can_use_multiple_mailbox or current_user.full_mailbox %}