-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Add initial implementation of audit trails module #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
itsyaasir
wants to merge
46
commits into
main
Choose a base branch
from
feat/audit-trails-dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+6,500
−7
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ails for consistency
* rename `audit_trails` folder to `audit-trails-move` * Add folders for audit-trails-rs and audit_trails_wasm
* 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.
…guration structure
Rename MetaDataUpdate to MetadataUpdate Co-authored-by: Yasir <[email protected]>
…corresponding tests
…otaledger/notarization into feat/audit-trails-api-roles-management
…e verb-subject format
…-management # Conflicts: # audit-trail-move/sources/locking.move # audit-trails-move/sources/audit_trails.move
…anagement Feat/audit trails api roles management
Audit Trails API
itsyaasir
commented
Jan 5, 2026
Comment on lines
31
to
38
| // TODO: Is this needed? What is a setup capability? | ||
| // | ||
| // /// Create a setup capability for trail initialization | ||
| // public fun new_setup_cap(ctx: &mut TxContext): Capability { | ||
| // Capability { | ||
| // id: object::new(ctx), | ||
| // } | ||
| // } |
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this
Also split of the role and capability management from the AT main module to allow reuse with other products.
…extended # Conflicts: # audit-trail-move/sources/audit_trail.move # audit-trail-move/sources/capability.move # audit-trail-move/tests/capability_tests.move # audit-trail-move/tests/create_audit_trail_tests.move # audit-trail-move/tests/role_tests.move # audit-trail-move/tests/test_utils.move
- Changed capability permission checks in `has_capability_permission` and `destroy_capability` functions to use `cap.trail_id()` instead of `cap.id()`. - Improved test cases for capability creation, revocation, and metadata updates, ensuring proper permission handling and error scenarios. - Added new tests for locking configurations and metadata management, enhancing overall test coverage for the audit trail functionality.
- Reformatted function calls in locking and role tests for better readability by aligning parameters across multiple lines. - Enhanced clarity in test cases related to locking configurations and role permissions, ensuring easier maintenance and understanding of the test logic.
- Fixed typos in comments related to the `Permission` enum and `admin_permissions` function for clarity. - Enhanced documentation to better reflect the intended roles and permissions within the audit trail system.
…ns to use non-optional name field; adjust tests for consistency
chore: function refactor, adding of emitting events & improving test coverage
chore: make `ImmutableMetadata` optional
…extended # Conflicts: # audit-trail-move/sources/audit_trail.move # audit-trail-move/tests/capability_tests.move
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Links to any relevant issues
Type of change
How the change has been tested
Change checklist