Skip to content

feat(report): sysadmin daily report page - #63

Merged
Gutts-n merged 1 commit into
mainfrom
feat/admin-daily-report
Nov 27, 2026
Merged

Gutts-n merged 1 commit into
mainfrom
feat/admin-daily-report

Conversation

@Gutts-n

@Gutts-n Gutts-n commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Adds the Daily Report page to the CKAN admin area, for sysadmins only. Refs datopian/client-sse-networks-shared#365 (assessment row 10).

The idea

The daily report email now only says how many things changed. The details (who did what, to which data asset or profile, when) are kept out of email and shown on a page that only a system administrator can open.

What changed

  • blueprints/admin.py: new page /ckan-admin/daily-report. It checks the caller is a sysadmin (403 otherwise), calls the existing daily_report_activity action (itself sysadmin-only), and shows yesterday's activity.
  • templates/admin/daily-report.html: the page. Lists each user's activities for the previous day ("updated the data asset ..."), grouped by user, with the time.
  • templates/admin/base.html: "Daily Report" tab in the admin menu.
  • tests/test_admin_daily_report.py: sysadmin gets 200, normal user 403, anonymous is redirected or refused.

Not included

  • Commits of the content repository (the old email listed them): CKAN has no access to that data.
  • The Prefect email text still says details are "available to authorised administrators in CKAN"; that stays true now.

Verified / not verified

  • Verified: Python compiles; the template renders correctly with mock activities (checked in a plain Jinja environment, not inside CKAN).
  • NOT verified: CKAN tests have not been run, and the page has not been opened in a CKAN instance.

Deployment

Merging to main creates a release tag (semantic-release). Dev and prod pin a commit, so nothing changes until their helm repos are bumped. This is not part of the prod hotfix PR.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 03b77131-3530-4389-beff-66ccd82df1f4
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@anuveyatsu

Copy link
Copy Markdown
Member

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Gutts-n
Gutts-n merged commit 449dbb2 into main Nov 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants