Administrator Tooling - FaqiangMei/MHA-Survey-Portal GitHub Wiki
Administrator Tooling
Objectives
- Give program leadership and developer-operators full control of surveys, cohorts, authentication, and system configuration.
- Provide auditable workflows for every destructive action (survey deletion, membership changes, environment updates).
- Offer dashboards that summarize portal health (queues, notifications, and background jobs) before each term launches.
Entry Points
- Administrators authenticate either through TAMU Google SSO or via the
ENABLE_ROLE_SWITCHflag for QA accounts. DashboardsController#adminloads cards for survey status, queue health, and outstanding tasks.- Most admin CRUD flows mount under
/admin/*namespaces (seeconfig/routes.rb).
Core Modules
| Module | Description | Key Implementation |
|---|---|---|
| Survey Builder | Create/edit surveys, attach question banks, manage track visibility, and publish/unpublish windows. | Admin::SurveysController, Survey, SurveyQuestion |
| Membership Management | Assign students/advisors to cohorts, graduate or archive users, and sync advisor/client ratios. | Admin::MembershipsController, Admin::StudentsController, StudentProfile |
| Role & Access Control | Promote/demote user roles, toggle feature flags, and manage impersonation settings. | Admin::RolesController, RoleGrant, FeatureFlag |
| Evidence & File Policy | Configure storage backends, Google Drive scopes, and attachment expiration. | EvidencePolicy, EvidenceController, config/storage.yml |
| System Status | Surface queue backlogs, recent failures, audit logs, and background job health. | Admin::SystemController, ActiveJob::Status, lograge dashboards |
Automation & Auditing
- Every admin action writes to
AuditLogwith actor, subject, and payload diff for FERPA compliance. - Background jobs (survey assignment, notification fan-out, report generation) are tagged; the admin dashboard links directly to their job IDs for reruns.
- Environment configuration lives in
config/credentials/*.yml.encwith instructions in the System Administration page.
Deployment & Maintenance Checklist
- Review
Admin → System Statusbefore and after deployments to confirm queues drain and no jobs retry unexpectedly. - Run
docker compose run --rm web bundle exec rubocop && docker compose run --rm web bundle exec rails testfor release branches. - Rotate OAuth secrets and storage credentials each semester; update the wiki’s Local Environment Variables page when values change.
- Export composite reports via
CompositeReportGeneratorbefore schema migrations touching survey/question tables.
Related Documents
- Project Overview
- Architecture
- System Administration
- Student Experience / Advisor Experience for downstream impact