Skip to content

Commit 9d99c62

Browse files
remove google sheets leftovers (#12509)
1 parent 5f3e862 commit 9d99c62

File tree

5 files changed

+2
-280
lines changed

5 files changed

+2
-280
lines changed

docs/content/en/open_source/archived_docs/google-sheets-sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ weight: 8
66
exclude_search: true
77
---
88

9-
**Please note - the Google Sheets feature has been deprecated as of DefectDojo version 2.21.0 - these documents are for reference only.**
9+
**Please note - the Google Sheets feature has been removed in DefectDojo version 2.21.0 - these documents are for reference only.**
1010

1111
With the Google Sheets sync feature, DefectDojo allow the users to
1212
export all the finding details of each test into a separate Google

dojo/management/commands/initialize_permissions.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import logging
22

3-
from django.contrib.auth.models import Permission
43
from django.contrib.contenttypes.models import ContentType
54
from django.core.management.base import BaseCommand
65

@@ -15,16 +14,7 @@ class Command(BaseCommand):
1514

1615
def handle(self, *args, **options):
1716
try:
18-
content_type_system_settings = ContentType.objects.get(app_label="dojo", model="system_settings")
19-
google_permission = Permission.objects.filter(content_type=content_type_system_settings,
20-
codename="change_google_sheet").count()
21-
if google_permission == 0:
22-
Permission.objects.create(
23-
name="Can change Google Sheet",
24-
content_type=content_type_system_settings,
25-
codename="change_google_sheet",
26-
)
27-
17+
# nothing left here after google sheets removal
2818
logger.info("Non-standard permissions have been created")
2919
except ContentType.DoesNotExist:
3020
logger.warning("No content type found for dojo.system_settings")

dojo/user/utils.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ def get_configuration_permissions_fields():
6767
else:
6868
github_permissions = []
6969

70-
if get_system_setting("enable_google_sheets"):
71-
google_sheet_permissions = [
72-
Permission_Helper(name="google sheet", app="dojo", change=True),
73-
]
74-
else:
75-
google_sheet_permissions = []
76-
7770
if get_system_setting("enable_jira"):
7871
jira_permissions = [
7972
Permission_Helper(name="jira instance", app="dojo", view=True, add=True, change=True, delete=True),
@@ -95,7 +88,6 @@ def get_configuration_permissions_fields():
9588
Permission_Helper(name="development environment", app="dojo", add=True, change=True, delete=True),
9689
Permission_Helper(name="finding template", app="dojo", view=True, add=True, change=True, delete=True),
9790
*github_permissions,
98-
*google_sheet_permissions,
9991
Permission_Helper(name="group", app="auth", view=True, add=True),
10092
*jira_permissions,
10193
Permission_Helper(name="language type", app="dojo", view=True, add=True, change=True, delete=True),

tests/base_test_class.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,12 +210,6 @@ def goto_component_overview(self, driver):
210210
driver.get(self.base_url + "components")
211211
return driver
212212

213-
def goto_google_sheets_configuration_form(self, driver):
214-
# if something is terribly wrong, it may still fail, even if system_settings is disabled.
215-
# See https://github.com/DefectDojo/django-DefectDojo/issues/3742 for reference.
216-
driver.get(self.base_url + "configure_google_sheets")
217-
return driver
218-
219213
def goto_active_engagements_overview(self, driver):
220214
driver.get(self.base_url + "engagement/active")
221215
return driver

unittests/vcr/google_sheets/GoogleSheetsConfigTestApi.test_config_google_sheets.yaml

Lines changed: 0 additions & 254 deletions
This file was deleted.

0 commit comments

Comments
 (0)