[JITERA] Create Audit Log API Endpoints
Created by: akuita
This pull request is created by JITERA
Description
[BL] Retrieve audit logs
| file | name |
|---|---|
| /app/controllers/api/audit_logs_controller.rb | Implement "index" action to retrieve audit logs |
| /config/routes.rb | Add route for audit logs index action |
| /app/policies/audit_log_policy.rb | Define "AuditLogPolicy" for authorization checks |
| /app/serializers/audit_log_serializer.rb | Create "AuditLogSerializer" for formatting audit logs |
[BL] Export audit logs
| file | name |
|---|---|
| /app/controllers/api/base_controller.rb | Add method to check user's administrative privileges |
| /app/controllers/api/audit_logs_controller.rb | Implement audit logs export functionality |
| /app/jobs/audit_log_export_job.rb | Create a Sidekiq job for audit log export email |
| /config/routes.rb | Add route for audit logs export |
| /app/models/user.rb | Add admin check method to User model |