mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-19 14:09:20 -04:00
Remove the user-specific agreement pages
We used to give users the right version of the agreement by guessing their organisation from their email address. Now we do it by looking at the organisation of the service they’re looking at. In other words, users should only be downloading the agreement as part of the go live journey, not outside it. This is because we think that users will get confused if they download the agreement and: - find there’s nowhere to physically sign it - think that accepting the agreement is all they need to do to go live Maintaining two paths to download the agreement also makes the code more complicated, and makes it harder to update the content on these pages.
This commit is contained in:
@@ -6,28 +6,18 @@ from flask_login import current_user
|
||||
from app import current_service
|
||||
from app.main import main
|
||||
from app.main.forms import AcceptAgreementForm
|
||||
from app.main.views.sub_navigation_dictionaries import features_nav
|
||||
from app.s3_client.s3_mou_client import get_mou
|
||||
from app.utils import user_has_permissions, user_is_logged_in
|
||||
|
||||
|
||||
@main.route('/agreement')
|
||||
@user_is_logged_in
|
||||
def agreement():
|
||||
return render_template(
|
||||
'views/agreement/{}.html'.format(current_user.default_organisation.as_jinja_template),
|
||||
owner=current_user.default_organisation.name,
|
||||
navigation_links=features_nav(),
|
||||
)
|
||||
from app.utils import user_has_permissions
|
||||
|
||||
|
||||
@main.route('/services/<uuid:service_id>/agreement')
|
||||
@user_has_permissions('manage_service')
|
||||
def service_agreement(service_id):
|
||||
return render_template(
|
||||
'views/agreement/service-{}.html'.format(current_service.organisation.as_jinja_template),
|
||||
owner=current_service.organisation.name,
|
||||
)
|
||||
if current_service.organisation.crown is None:
|
||||
return render_template('views/agreement/service-agreement-choose.html')
|
||||
if current_service.organisation.agreement_signed:
|
||||
return render_template('views/agreement/service-agreement-signed.html')
|
||||
return render_template('views/agreement/service-agreement.html')
|
||||
|
||||
|
||||
@main.route('/services/<uuid:service_id>/agreement.pdf')
|
||||
@@ -82,14 +72,6 @@ def service_confirm_agreement(service_id):
|
||||
return render_template('views/agreement/agreement-confirm.html')
|
||||
|
||||
|
||||
@main.route('/agreement.pdf')
|
||||
@user_is_logged_in
|
||||
def download_agreement():
|
||||
return send_file(**get_mou(
|
||||
current_user.default_organisation.crown_status_or_404
|
||||
))
|
||||
|
||||
|
||||
@main.route('/agreement/<variant>', endpoint='public_agreement')
|
||||
@main.route('/agreement/<variant>.pdf', endpoint='public_download_agreement')
|
||||
def public_agreement(variant):
|
||||
|
||||
@@ -212,7 +212,9 @@ def submit_request_to_go_live(service_id):
|
||||
service_name=current_service.name,
|
||||
service_dashboard=url_for('main.service_dashboard', service_id=current_service.id, _external=True),
|
||||
organisation_type=str(current_service.organisation_type).title(),
|
||||
agreement=current_service.organisation.as_human_readable(current_user.email_domain),
|
||||
agreement=current_service.organisation.as_agreement_statement_for_go_live_request(
|
||||
current_user.email_domain
|
||||
),
|
||||
volume_email_formatted=format_thousands(current_service.volume_email),
|
||||
volume_sms_formatted=format_thousands(current_service.volume_sms),
|
||||
volume_letter_formatted=format_thousands(current_service.volume_letter),
|
||||
|
||||
Reference in New Issue
Block a user