Skip to content

Init for bugfix#126

Merged
TatjanaTrajkovic merged 2 commits into
mainfrom
feature/activity_log_service
Apr 4, 2026
Merged

Init for bugfix#126
TatjanaTrajkovic merged 2 commits into
mainfrom
feature/activity_log_service

Conversation

@TatjanaTrajkovic

@TatjanaTrajkovic TatjanaTrajkovic commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Activity logging behavior updated so more actions are consistently recorded in the audit/activity log, improving visibility of recently performed operations.

@coderabbitai

coderabbitai Bot commented Apr 4, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 86309dc1-c8f7-4ba1-b368-933179854253

📥 Commits

Reviewing files that changed from the base of the PR and between 326b785 and 56f009d.

📒 Files selected for processing (1)
  • src/main/java/org/example/vet1177/services/ActivityLogService.java
💤 Files with no reviewable changes (1)
  • src/main/java/org/example/vet1177/services/ActivityLogService.java

📝 Walkthrough

Walkthrough

Removed the call to activityLogPolicy.canCreate(user) from ActivityLogService.log(...); all other validation and persistence logic in that method remains unchanged.

Changes

Cohort / File(s) Summary
Activity log service
src/main/java/org/example/vet1177/services/ActivityLogService.java
Removed the authorization policy call activityLogPolicy.canCreate(user) from log(...); no other logic or signature changes.

Sequence Diagram(s)

(omitted — change is a small authorization call removal, no new multi-component flow to visualize)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • ithsjava25/project-backend-org-random-coders#116: Modifies the same ActivityLogService.log() method to remove the activityLogPolicy.canCreate(user) check — appears to be the same objective.

Possibly related PRs

  • ithsjava25/project-backend-org-random-coders#70: Directly modifies ActivityLogService.log and touches the same authorization logic removed here.
  • ithsjava25/project-backend-org-random-coders#64: Alters ActivityLogService.log(...) adding null-input validation and business-rule handling near the same area.
  • ithsjava25/project-backend-org-random-coders#63: Introduces/changes ActivityLogPolicy.canCreate(...), which is the call removed by this PR.

Suggested reviewers

  • johanbriger
  • annikaholmqvist94

Poem

"I nudged a tiny policy line away,
Hopped through code where records play,
No more gate for the logging stream,
A rabbit's wink, a lighter beam,
Carrots cheer — the logs can stay!" 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Init for bugfix' is vague and does not describe the actual change: removal of a policy check call in ActivityLogService. Replace with a descriptive title that specifies the change, such as 'Remove policy check from ActivityLogService.log()' or 'Remove activityLogPolicy.canCreate() call from ActivityLogService'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/activity_log_service

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@TatjanaTrajkovic
TatjanaTrajkovic merged commit faa2a30 into main Apr 4, 2026
2 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.

ActivityLogService.log() blocks OWNER and VET from creating medical records

1 participant