Skip to content

Comments

Implement missing features: Audit Logging, Permissions API, and CLI Rollback#3

Open
chlewtf wants to merge 2 commits intomainfrom
fix-missing-features-538594328927864103
Open

Implement missing features: Audit Logging, Permissions API, and CLI Rollback#3
chlewtf wants to merge 2 commits intomainfrom
fix-missing-features-538594328927864103

Conversation

@chlewtf
Copy link
Member

@chlewtf chlewtf commented Feb 24, 2026

Identified and implemented several features that were documented but missing in the implementation:

  1. Audit Logging: Added a dedicated AuditLogger service and exposed it through the ExtensionLibrary PHP API. The admin settings controller now automatically records changes in the audit log.
  2. Permissions API: Exposed the PermissionService via the ExtensionLibrary's can() method, allowing extensions to easily check user permissions.
  3. CLI Rollback: Implemented a robust rollback mechanism in the reshaped install command. If installation or an update fails, the CLI will now automatically restore the previous state from a backup (if updating) or clean up partially installed files (if new installation), ensuring the panel remains in a working state.

Also addressed feedback regarding rollback safety and scoping. Verified all changes with framework and CLI test suites.


PR created automatically by Jules for task 538594328927864103 started by @chlewtf

…ollback

- Created AuditLogger service in the framework.
- Integrated AuditLogger and PermissionService into ExtensionLibrary.
- Updated ExtensionsController to log settings updates in the audit log.
- Implemented atomic rollback mechanism in the CLI install command.
- Fixed variable scoping and cleanup logic in the CLI installer.
- Improved rollback safety to avoid deleting existing extensions on early failure.

Co-authored-by: chlewtf <234900867+chlewtf@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

- Fixed PHPDoc alignment in AuditLogger service to satisfy Laravel Pint.
- Improved CLI rollback logic to avoid data loss on early installation failures.
- Restored package-lock.json to avoid unintended noise.
- Removed PHPUnit cache file from repository.

Co-authored-by: chlewtf <234900867+chlewtf@users.noreply.github.com>
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.

1 participant