Skip to content
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

Introduce Transient Permission in Access Controller #393

Merged

Conversation

kingster-will
Copy link

Description

This PR introduces transient permissions in the Access Controller, allowing users to set one-time use permissions that only take effect in the current transaction. This feature enhances the flexibility and security of the permission management system.

Key Changes

  • Transient Permission Implementation: Added functionality to set and check transient permissions that are valid only for the current transaction.

@kingster-will kingster-will merged commit 3a9c562 into storyprotocol:main Feb 4, 2025
10 checks passed
@kingster-will
Copy link
Author

Hey @berndartmueller,
Could you please help to review this PR?

@berndartmueller
Copy link

Hey @berndartmueller, Could you please help to review this PR?

Hey @kingster-will! Sure, I'm just a bit behind on chores, so please allow me some time to review it. I'll try to get to it next week.

@berndartmueller
Copy link

Hey @kingster-will! I reviewed the changes and have a question.

I noticed that once a transient permission is set in the current tx, it's not possible anymore that a previously set (permanent) permission is used during this very same tx. checkPermission(..) only verifies transient permissions due to _usingTransientPermission() returning true once a transient permission is set. Is this intentional?

@kingster-will
Copy link
Author

Hey @kingster-will! I reviewed the changes and have a question.

I noticed that once a transient permission is set in the current tx, it's not possible anymore that a previously set (permanent) permission is used during this very same tx. checkPermission(..) only verifies transient permissions due to _usingTransientPermission() returning true once a transient permission is set. Is this intentional?

Hey @berndartmueller ,

Yes, this is intentional. When the IP owner sets a one-time (transient) permission in the current transaction, all permanent permissions are ignored for that transaction. This prevents confusion when checking permissions by avoiding the combination of transient and permanent permissions, ensuring straightforward permission management.

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