Skip to content

feat: introduce multiple guards #590

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

Open
wants to merge 4 commits into
base: next
Choose a base branch
from

Conversation

edwardoranj
Copy link

@edwardoranj edwardoranj commented Apr 9, 2025

Description

Introduced multiple guards on query and update macros to protect them with several guards.

#[update(guards = ["only_admin", "non_reentrant"])]
fn do_something() {
...
}

Fixes #413

How Has This Been Tested?

Added relevant unit test cases

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

dependabot bot and others added 2 commits April 1, 2025 10:08
Bumps [ring](https://github.com/briansmith/ring) from 0.17.8 to 0.17.13.
- [Changelog](https://github.com/briansmith/ring/blob/main/RELEASES.md)
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@edwardoranj edwardoranj changed the title feat: deprecate guard attribute and introduce guards for multiple… feat: introduce multiple guards Apr 9, 2025
@cla-idx-bot
Copy link

cla-idx-bot bot commented Apr 9, 2025

Dear @edwardoranj,

In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA.

If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged.

— The DFINITY Foundation

@edwardoranj edwardoranj marked this pull request as ready for review April 9, 2025 14:29
@edwardoranj edwardoranj requested a review from a team as a code owner April 9, 2025 14:29
@lwshang lwshang changed the base branch from main to next April 11, 2025 13:34
@lwshang
Copy link
Contributor

lwshang commented Apr 11, 2025

Thank you for your contribution! 🙌

Our main development happens on the next branch, so I’ve changed the base branch for this PR. There are a few conflicts to resolve—to speed things up, would you mind granting me permission to edit your PR branch?

You can enable it by following this page.

If you’d prefer to resolve the conflicts yourself, just let me know! Either way, I’m happy to help.

Thanks again for your work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: multiple guards
2 participants