Skip to content

Commit ea713bc

Browse files
feature/dep232: Removed all references to CAC forms, fixed small styling issue. (#2814)
1 parent 5b69ca9 commit ea713bc

33 files changed

Lines changed: 103 additions & 1282 deletions

File tree

CHANGELOG.MD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66

77
## April 8, 2026
88

9+
- **Chore** Removed all references to CAC Forms [🎟️ DEP-232](https://citz-gdx.atlassian.net/browse/DEP-232)
10+
- Removed model, resource, and service from API
11+
- Added a migration for removing the table from the Postgres db
12+
- Removed any CAC-related constants
13+
- Removed any CAC-related values from enums but preserved positioning
14+
- Removed unneeded components from the front end, and references to the components
15+
- Removed translation strings
16+
- Removed any associated unit tests
17+
- Modified subscribe widget to remove CAC form option
18+
- Fixed small styling issues with container width in Authoring: More Engagements component
19+
920
- **Bugfix** Make sure user listing page only shows users from the current tenant, even for super admins [🎟️ DEP-246](https://citz-gdx.atlassian.net/browse/DEP-246)
1021
- Updated the API endpoint for listing users to filter results based on the current tenant, even for users with the SUPER_ADMIN role. This ensures that super admins only see users from their currently selected tenant, rather than all users across all tenants.
1122
- Updated unit tests to reflect this change and ensure that the user listing behaves as expected for super admins.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
"""Remove CAC form table.
2+
3+
Revision ID: c39ccb80cb0b
4+
Revises: 59138db76b10
5+
Create Date: 2026-04-08 17:30:30.126643
6+
7+
"""
8+
from alembic import op
9+
import sqlalchemy as sa
10+
from sqlalchemy.dialects import postgresql
11+
12+
# revision identifiers, used by Alembic.
13+
revision = 'c39ccb80cb0b'
14+
down_revision = '59138db76b10'
15+
branch_labels = None
16+
depends_on = None
17+
18+
19+
def upgrade():
20+
op.drop_table('cac_form')
21+
22+
def downgrade():
23+
op.create_table('cac_form',
24+
sa.Column('created_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
25+
sa.Column('updated_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
26+
sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
27+
sa.Column('engagement_id', sa.INTEGER(), autoincrement=False, nullable=False),
28+
sa.Column('tenant_id', sa.INTEGER(), autoincrement=False, nullable=True),
29+
sa.Column('understand', sa.BOOLEAN(), autoincrement=False, nullable=False),
30+
sa.Column('terms_of_reference', sa.BOOLEAN(), autoincrement=False, nullable=False),
31+
sa.Column('first_name', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
32+
sa.Column('last_name', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
33+
sa.Column('city', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
34+
sa.Column('email', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
35+
sa.Column('created_by', sa.VARCHAR(length=50), autoincrement=False, nullable=True),
36+
sa.Column('updated_by', sa.VARCHAR(length=50), autoincrement=False, nullable=True),
37+
sa.ForeignKeyConstraint(['engagement_id'], ['engagement.id'], name='cac_form_engagement_id_fkey', ondelete='CASCADE'),
38+
sa.ForeignKeyConstraint(['tenant_id'], ['tenant.id'], name='cac_form_tenant_id_fkey'),
39+
sa.PrimaryKeyConstraint('id', name='cac_form_pkey')
40+
)

api/src/api/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
from .widget_video import WidgetVideo
5252
from .widget_listening import WidgetListening
5353
from .widget_image import WidgetImage
54-
from .cac_form import CACForm
5554
from .engagement_metadata import EngagementMetadata, MetadataTaxon
5655
from .widget_timeline import WidgetTimeline
5756
from .timeline_event import TimelineEvent

api/src/api/models/cac_form.py

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

api/src/api/resources/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from .report_setting import API as REPORT_SETTING_API
5353
from .widget_video import API as WIDGET_VIDEO_API
5454
from .engagement_settings import API as ENGAGEMENT_SETTINGS_API
55-
from .cac_form import API as CAC_FORM_API
5655
from .widget_timeline import API as WIDGET_TIMELINE_API
5756
from .widget_poll import API as WIDGET_POLL_API
5857
from .widget_image import API as WIDGET_IMAGE_API
@@ -107,7 +106,6 @@
107106
API.add_namespace(WIDGET_VIDEO_API, path='/widgets/<int:widget_id>/videos')
108107
API.add_namespace(WIDGET_LISTENING_API, path='/widgets/<int:widget_id>/listening_widgets')
109108
API.add_namespace(ENGAGEMENT_SETTINGS_API)
110-
API.add_namespace(CAC_FORM_API, path='/engagements/<int:engagement_id>/cacform')
111109
API.add_namespace(WIDGET_TIMELINE_API, path='/widgets/<int:widget_id>/timelines')
112110
API.add_namespace(WIDGET_POLL_API, path='/widgets/<int:widget_id>/polls')
113111
API.add_namespace(WIDGET_IMAGE_API, path='/widgets/<int:widget_id>/images')

api/src/api/resources/cac_form.py

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

api/src/api/services/cac_form_service.py

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

api/src/api/utils/enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class GeneratedDocumentTypes(IntEnum):
4949
"""Document Types."""
5050

5151
COMMENT_SHEET_STAFF = 1
52-
CAC_FORM_SHEET = 2
52+
# CAC_FORM_SHEET Removed
5353
COMMENT_SHEET_PROPONENT = 3
5454

5555

api/src/api/utils/roles.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class Role(Enum):
5353
VIEW_FEEDBACKS = 'view_feedbacks'
5454
VIEW_ALL_ENGAGEMENTS = 'view_all_engagements' # Allows user access to all engagements including draft
5555
SHOW_ALL_COMMENT_STATUS = 'show_all_comment_status' # Allows user to see all comment status
56-
EXPORT_ALL_CAC_FORM_TO_SHEET = 'export_all_cac_form_to_sheet' # Allows users to export CAC form to csv
57-
EXPORT_CAC_FORM_TO_SHEET = 'export_cac_form_to_sheet' # Allows users to export CAC form to csv
5856
VIEW_ALL_SURVEY_RESULTS = 'view_all_survey_results' # Allows users to view results to all questions
5957
UNPUBLISH_ENGAGEMENT = 'unpublish_engagement'
6058
EXPORT_ALL_TO_CSV = 'export_all_to_csv'

0 commit comments

Comments
 (0)