Ensure users are authenticated for most pages (#586)

* Ensure users are authenticated for most pages

This changeset makes sure that users must be authenticated and logged in to view most pages of the Notify service.  We are moving to a model where only the home page and a select few others will be publicly accessible for the time being.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2023-07-03 15:03:33 -04:00
committed by GitHub
parent 1d8059da94
commit da84a18970
3 changed files with 34 additions and 7 deletions

View File

@@ -7,11 +7,13 @@ from notifications_utils.international_billing_rates import (
from app.main import main
from app.main.forms import SearchByNameForm
from app.main.views.sub_navigation_dictionaries import using_notify_nav
from app.utils.user import user_is_logged_in
CURRENT_SMS_RATE = '1.72'
@main.route('/using-notify/pricing')
@user_is_logged_in
def pricing():
return render_template(
'views/pricing/index.html',
@@ -26,6 +28,7 @@ def pricing():
@main.route('/pricing/how-to-pay')
@user_is_logged_in
def how_to_pay():
return render_template(
'views/pricing/how-to-pay.html',
@@ -34,6 +37,7 @@ def how_to_pay():
@main.route('/pricing/billing-details')
@user_is_logged_in
def billing_details():
if current_user.is_authenticated:
return render_template(