Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/olympia/scanners/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
from .tasks import run_scanner_query_rule


SERVICE_ACCOUNT_SHEET_URL = 'https://docs.google.com/spreadsheets/d/1VdiUAoluolqZIwvMZebaJIMqPbdewwiD-S8Z2g7gx08'


@admin.display(description='Matched Rules')
def formatted_matched_rules_with_files_and_data(
obj,
Expand Down Expand Up @@ -1118,3 +1121,12 @@ def save_model(self, request, obj, form, change):
)
except Exception: # noqa: S110 (best-effort display of one-time JWT keys)
pass
messages.add_message(
request,
messages.INFO,
format_html(
'You must add this new webhook account to the '
'<a href="{}">service account sheet</a>.',
SERVICE_ACCOUNT_SHEET_URL,
),
)
1 change: 1 addition & 0 deletions src/olympia/scanners/tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,7 @@ def test_create(self):
assert b'Please note the JWT keys' in response.content
assert api_key.key.encode() in response.content
assert api_key.secret.encode() in response.content
assert b'service account sheet' in response.content

response = self.client.post(
reverse('admin:scanners_scannerwebhook_change', args=(webhook.pk,)),
Expand Down
Loading