mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 08:28:15 -04:00
dont use has_permissions to check for platform admins
platform_admin is a separate concept to permissions, so by removing the checks for it from the current_user.has_permissions function, we can simplify things greatly. We already record on the user whether they're a platform admin anyway.
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
from flask import abort, redirect, render_template, request, url_for
|
from flask import abort, redirect, render_template, request, url_for
|
||||||
from flask_login import current_user, login_required
|
from flask_login import current_user, login_required
|
||||||
from notifications_utils.international_billing_rates import (
|
from notifications_utils.international_billing_rates import \
|
||||||
INTERNATIONAL_BILLING_RATES,
|
INTERNATIONAL_BILLING_RATES
|
||||||
)
|
|
||||||
from notifications_utils.template import HTMLEmailTemplate
|
from notifications_utils.template import HTMLEmailTemplate
|
||||||
|
|
||||||
from app import convert_to_boolean
|
from app import convert_to_boolean
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import copy
|
|||||||
import pytest
|
import pytest
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
|
from tests.conftest import service_one as create_sample_service
|
||||||
from tests.conftest import (
|
from tests.conftest import (
|
||||||
SERVICE_ONE_ID,
|
SERVICE_ONE_ID,
|
||||||
active_user_manage_template_permission,
|
active_user_manage_template_permission,
|
||||||
@@ -11,7 +12,6 @@ from tests.conftest import (
|
|||||||
active_user_with_permissions,
|
active_user_with_permissions,
|
||||||
normalize_spaces,
|
normalize_spaces,
|
||||||
)
|
)
|
||||||
from tests.conftest import service_one as create_sample_service
|
|
||||||
|
|
||||||
import app
|
import app
|
||||||
from app.notify_client.models import InvitedUser
|
from app.notify_client.models import InvitedUser
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from tests import (
|
|||||||
template_json,
|
template_json,
|
||||||
validate_route_permission,
|
validate_route_permission,
|
||||||
)
|
)
|
||||||
|
from tests.conftest import service_one as create_sample_service
|
||||||
from tests.conftest import (
|
from tests.conftest import (
|
||||||
SERVICE_ONE_ID,
|
SERVICE_ONE_ID,
|
||||||
mock_get_service_email_template,
|
mock_get_service_email_template,
|
||||||
@@ -18,9 +19,8 @@ from tests.conftest import (
|
|||||||
mock_get_service_template,
|
mock_get_service_template,
|
||||||
no_letter_contact_blocks,
|
no_letter_contact_blocks,
|
||||||
normalize_spaces,
|
normalize_spaces,
|
||||||
|
single_letter_contact_block,
|
||||||
)
|
)
|
||||||
from tests.conftest import service_one as create_sample_service
|
|
||||||
from tests.conftest import single_letter_contact_block
|
|
||||||
|
|
||||||
from app.main.views.templates import (
|
from app.main.views.templates import (
|
||||||
get_human_readable_delta,
|
get_human_readable_delta,
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from app.notify_client.template_statistics_api_client import (
|
from app.notify_client.template_statistics_api_client import \
|
||||||
TemplateStatisticsApiClient,
|
TemplateStatisticsApiClient
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def test_template_statistics_client_calls_correct_api_endpoint_for_service(mocker, api_user_active):
|
def test_template_statistics_client_calls_correct_api_endpoint_for_service(mocker, api_user_active):
|
||||||
|
|||||||
Reference in New Issue
Block a user