Skip to content

Commit

Permalink
Merge pull request #4587 from GSA-TTS/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jadudm authored Jan 7, 2025
2 parents b315cd0 + b727346 commit eed3273
Show file tree
Hide file tree
Showing 21 changed files with 36 additions and 54 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
cf_command: update-user-provided-service fac-key-service -p '"{\"SAM_API_KEY\":\"${{ secrets.SAM_API_KEY }}\", \"DJANGO_SECRET_LOGIN_KEY\":\"${{ secrets.DJANGO_SECRET_LOGIN_KEY }}\", \"LOGIN_CLIENT_ID\":\"${{ secrets.LOGIN_CLIENT_ID }}\", \"SECRET_KEY\":\"${{ secrets.SECRET_KEY}}\"}"'

- name: Backup the database
# if: startsWith(github.ref, 'refs/tags/v1.')
if: startsWith(github.ref, 'refs/tags/v1.')
uses: cloud-gov/cg-cli-tools@main
with:
cf_username: ${{ secrets.CF_USERNAME }}
Expand Down
1 change: 0 additions & 1 deletion backend/audit/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ def handle_auditor_certification(self, request, obj, sac):
"is_auditee_responsible": True,
"has_used_auditors_report": True,
"has_no_auditee_procedures": True,
"is_accurate_and_complete": True,
"is_FAC_releasable": True,
},
"auditor_signature": {
Expand Down
1 change: 0 additions & 1 deletion backend/audit/fixtures/single_audit_checklist.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def fake_auditor_certification():
"is_auditee_responsible": True,
"has_used_auditors_report": True,
"has_no_auditee_procedures": True,
"is_accurate_and_complete": True,
"is_FAC_releasable": True,
}
data_step_2 = {
Expand Down
1 change: 0 additions & 1 deletion backend/audit/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ class AuditorCertificationStep1Form(forms.Form):
has_used_auditors_report = forms.BooleanField()
has_no_auditee_procedures = forms.BooleanField()
is_FAC_releasable = forms.BooleanField()
is_accurate_and_complete = forms.BooleanField()


class AuditorCertificationStep2Form(forms.Form):
Expand Down
23 changes: 5 additions & 18 deletions backend/audit/templates/audit/auditor-certification-step-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h2 class="font-sans-md">Check the box next to each item confirm your report mee
value="True"
{% if form.cleaned_data.is_OMB_limited %}checked{% endif %} />
<label class="usa-checkbox__label" for="is_OMB_limited">
The SF-SAC contains only the data and information required by the Office of Management and Budget.
The data elements and information included in these workbooks are limited to those prescribed by the Office of Management and Budget;
</label>
<span class="usa-error-message">{{ form.errors.is_OMB_limited|striptags }}</span>
</div>
Expand All @@ -34,7 +34,7 @@ <h2 class="font-sans-md">Check the box next to each item confirm your report mee
value="True"
{% if form.cleaned_data.is_auditee_responsible %}checked{% endif %} />
<label class="usa-checkbox__label" for="is_auditee_responsible">
The information in Part II of this Form SF-SAC is the responsibility of the auditee and is based on information included in the reporting package required by the Uniform Guidance.
The information in these workbooks is the responsibility of the auditee and is based on information included in the reporting package required by the Uniform Guidance;
</label>
<span class="usa-error-message">{{ form.errors.is_auditee_responsible|striptags }}</span>
</div>
Expand All @@ -47,7 +47,7 @@ <h2 class="font-sans-md">Check the box next to each item confirm your report mee
value="True"
{% if form.cleaned_data.has_used_auditors_report %}checked{% endif %} />
<label class="usa-checkbox__label" for="has_used_auditors_report">
The auditor completed the Federal Award Audit Findings and Audit Findings Text workbooks using the auditor's report.
The information included in Major Program Information and Financial statements was transferred by the auditor from the auditor's report(s) for the period described in the General Information, and is not a substitute for such reports;
</label>
<span class="usa-error-message">{{ form.errors.has_used_auditors_report|striptags }}</span>
</div>
Expand All @@ -60,23 +60,10 @@ <h2 class="font-sans-md">Check the box next to each item confirm your report mee
value="True"
{% if form.cleaned_data.has_no_auditee_procedures %}checked{% endif %} />
<label class="usa-checkbox__label" for="has_no_auditee_procedures">
No auditor has performed any audit work since the completion of the auditor's report or the single audit submission workbooks.
The auditor has not performed any auditing procedures since the date of the auditor's report(s) or any additional auditing procedures in connection with the completion of this single audit submission; and
</label>
<span class="usa-error-message">{{ form.errors.has_no_auditee_procedures|striptags }}</span>
</div>
<div class="usa-checkbox margin-top-4">
<input id="is_accurate_and_complete"
name="is_accurate_and_complete"
class="usa-checkbox__input"
required
type="checkbox"
value="True"
{% if form.cleaned_data.is_accurate_and_complete %}checked{% endif %} />
<label class="usa-checkbox__label" for="is_accurate_and_complete">
All information required to be reported in this Form SF-SAC in its entirety and such information is accurate and complete.
</label>
<span class="usa-error-message">{{ form.errors.is_accurate_and_complete|striptags }}</span>
</div>
<div class="usa-checkbox margin-top-4">
<input id="is_FAC_releasable"
name="is_FAC_releasable"
Expand All @@ -86,7 +73,7 @@ <h2 class="font-sans-md">Check the box next to each item confirm your report mee
value="True"
{% if form.cleaned_data.is_FAC_releasable %}checked{% endif %} />
<label class="usa-checkbox__label" for="is_FAC_releasable">
The full reporting package and auditor's report may be shared publicly by the Federal Audit Clearinghouse or the report auditee, as required by the Uniform Guidance.
A copy of the reporting package required by the Uniform Guidance, which includes the complete auditors report(s), may be made available by the Federal Audit Clearinghouse (FAC) on the FAC website or from the auditee at the address listed in the Auditee information.
</label>
<span class="usa-error-message">{{ form.errors.is_FAC_releasable|striptags }}</span>
</div>
Expand Down
1 change: 0 additions & 1 deletion backend/audit/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1954,7 +1954,6 @@ def test_post_valid_form(self):
"has_used_auditors_report": True,
"has_no_auditee_procedures": True,
"is_FAC_releasable": True,
"is_accurate_and_complete": True,
}

response = self.client.post(self.url, form_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
FormFieldMap("is_auditee_responsible", None, FormFieldInDissem, "Y", bool),
FormFieldMap("has_used_auditors_report", None, FormFieldInDissem, "Y", bool),
FormFieldMap("has_no_auditee_procedures", None, FormFieldInDissem, "Y", bool),
FormFieldMap("is_accurate_and_complete", None, FormFieldInDissem, "Y", bool),
FormFieldMap("is_FAC_releasable", None, FormFieldInDissem, "Y", bool),
]

Expand Down
1 change: 0 additions & 1 deletion backend/cypress/support/auditor-certification.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export function testAuditorCertification() {
cy.get('label[for=is_auditee_responsible]').click();
cy.get('label[for=has_used_auditors_report]').click();
cy.get('label[for=has_no_auditee_procedures]').click();
cy.get('label[for=is_accurate_and_complete]').click();
cy.get('label[for=is_FAC_releasable]').click();
cy.get('.usa-button').contains('Agree to auditor certification').click();

Expand Down
2 changes: 1 addition & 1 deletion backend/manifests/manifest-fac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ applications:
memory: ((mem_amount))
path: ../
timeout: 180
disk_quota: 2G
disk_quota: 5G
env:
ENV: ((cf_env_name))
DJANGO_BASE_URL: https://((endpoint))
Expand Down
2 changes: 0 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,6 @@ six==1.16.0 \
sling==1.3.4 \
--hash=sha256:70541da99b48313a0cfd5e61c52d984e4d50113b7945308697d32cd50a6bb183
# via -r ./requirements/requirements.in
sling-linux-arm64==1.3.4 \
--hash=sha256:08977df437742b415232e8c09c2f7f43181a3b764bef601fa6ebd369f6777783
sling-linux-amd64==1.3.4 \
--hash=sha256:d5f3b71fb191e8b9663f88890c464d84ab4c36df3a5fd6148a51cdd2ea9a5099
# via sling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
"is_OMB_limited": {
"type": "boolean"
},
"is_accurate_and_complete": {
"type": "boolean"
},
"is_auditee_responsible": {
"type": "boolean"
}
Expand All @@ -28,7 +25,6 @@
"is_auditee_responsible",
"has_used_auditors_report",
"has_no_auditee_procedures",
"is_accurate_and_complete",
"is_FAC_releasable"
],
"type": "object"
Expand Down
6 changes: 3 additions & 3 deletions backend/schemas/source/sections/AdditionalEINs.schema.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.ADDITIONAL_EINS],
},
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
4 changes: 2 additions & 2 deletions backend/schemas/source/sections/AdditionalUEIs.schema.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.ADDITIONAL_UEIS],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.AUDIT_FINDINGS_TEXT],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ local AuditorCertification = Types.object {
is_auditee_responsible: Types.boolean,
has_used_auditors_report: Types.boolean,
has_no_auditee_procedures: Types.boolean,
is_accurate_and_complete: Types.boolean,
is_FAC_releasable: Types.boolean,
},
required: [
'is_OMB_limited',
'is_auditee_responsible',
'has_used_auditors_report',
'has_no_auditee_procedures',
'is_accurate_and_complete',
'is_FAC_releasable',
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.CORRECTIVE_ACTION_PLAN],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
4 changes: 2 additions & 2 deletions backend/schemas/source/sections/FederalAwards.schema.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.FEDERAL_AWARDS, Sheets.section_names.FEDERAL_AWARDS_EXPENDED],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.FEDERAL_AWARDS_AUDIT_FINDINGS],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
4 changes: 2 additions & 2 deletions backend/schemas/source/sections/NotesToSefa.schema.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.NOTES_TO_SEFA],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ local Meta = Types.object {
section_name: Types.string {
enum: [Sheets.section_names.SECONDARY_AUDITORS],
},
//Because we now pass the version to the SAC record,
//Because we now pass the version to the SAC record,
//we want to make sure we allow backwards compatibility
version: Types.string {
enum: ["1.0.0", "1.0.1", "1.0.2", "1.0.3", "1.0.4", "1.0.5", "1.1.0", "1.1.1", "1.1.2", Sheets.WORKBOOKS_VERSION]
enum: ['1.0.0', '1.0.1', '1.0.2', '1.0.3', '1.0.4', '1.0.5', '1.1.0', '1.1.1', '1.1.2', Sheets.WORKBOOKS_VERSION],
},
},
required: ['section_name'],
Expand Down
15 changes: 12 additions & 3 deletions backend/users/management/commands/create_staffusers.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# flake8: noqa
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
Expand All @@ -16,6 +17,9 @@ class Command(BaseCommand):

def handle(self, *args, **kwargs):
"""Create a group with readonly permissions."""
logger.info(f"Permission dump ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
logger.info(Permission.objects.all().values())

group_readonly, created = Group.objects.get_or_create(name="Read-only")
readonly_codenames = [
"view_access",
Expand All @@ -40,7 +44,10 @@ def handle(self, *args, **kwargs):
]
group_readonly.permissions.clear()
for code in readonly_codenames:
group_readonly.permissions.add(Permission.objects.get(codename=code))
try:
group_readonly.permissions.add(Permission.objects.get(codename=code))
except Exception as e:
logger.error(f"1. Failed to get ({code}) -- {e}")
group_readonly.save()

"""Create a group with helpdesk permissions."""
Expand All @@ -58,7 +65,10 @@ def handle(self, *args, **kwargs):
]
group_helpdesk.permissions.clear()
for code in helpdesk_codenames:
group_helpdesk.permissions.add(Permission.objects.get(codename=code))
try:
group_helpdesk.permissions.add(Permission.objects.get(codename=code))
except Exception as e:
logger.error(f"2. Failed to get ({code}) -- {e}")
group_helpdesk.save()

# read in staffusers JSON.
Expand Down Expand Up @@ -99,7 +109,6 @@ def handle(self, *args, **kwargs):
case "readonly":
user.groups.add(group_readonly)
case "helpdesk":
user.groups.clear()
user.groups.add(group_helpdesk)
case "superuser":
user.is_superuser = True
Expand Down

0 comments on commit eed3273

Please sign in to comment.