Skip to content

Conversation

@chrisgitiota
Copy link
Contributor

@chrisgitiota chrisgitiota commented Dec 22, 2025

Description of change

This PR provides a first version of the Permission enum, the initial roles config and an "Admin" role Capability creation at AT object creation.

Additionally:

  • First implementation of the permission module based on a Permission enum
  • Unit tests for:
    • Permission enum
    • Creating an AT (Admin cap is not used in these tests)
    • Creating an AT and defining a MetaDataAdmin role
  • Renamed AuditTrail::permissions to AuditTrail::roles
  • Renamed all modules and type-names from plural to singular name
      * audit_trails -> audit_trail
      * permissions -> permission
      * capabilities -> capability

* First implementation of the permission module based on a `Permission` enum
* Unit tests for the `Permission` enum
* Renamed `AuditTrail::permissions` to `AuditTrail::roles`
* Renamed all modules and type-names from plural to singular name
  * audit_trails -> audit_trail
  * permissions -> permission
  * capabilities -> capability
Unit tests are still buggy and will be fixed with the next commit.
@chrisgitiota chrisgitiota self-assigned this Dec 22, 2025
@chrisgitiota chrisgitiota marked this pull request as ready for review December 22, 2025 16:30
Copy link
Contributor

@itsyaasir itsyaasir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good except some few nitpicks.

Note: Missing negative tests (permission denied scenarios, invalid inputs) (can be done in upcoming PRs)

@itsyaasir itsyaasir merged commit 09f1a96 into feat/audit-trails-api Dec 24, 2025
11 checks passed
@itsyaasir itsyaasir deleted the feat/audit-trails-api-roles-management branch December 24, 2025 09:12
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.

3 participants