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

feat(examples): finalize acl package #2987

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

0xtekgrinder
Copy link

This PR adds missing functionalities from the acl package:

  • helpers to remove permissions.
  • helpers to adds multiple permissions at once -> {verbs: []string{"read","write"}}.
  • helpers to delete users from groups.
  • helpers to quickly reset states.

Everything can be tested by running gno test examples/gno.land/p/demo/acl

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests

@0xtekgrinder 0xtekgrinder requested review from a team as code owners October 20, 2024 09:48
@0xtekgrinder 0xtekgrinder requested review from sw360cab and petar-dambovaliev and removed request for a team October 20, 2024 09:48
@github-actions github-actions bot added the 🧾 package/realm Tag used for new Realms or Packages. label Oct 20, 2024
@notJoon notJoon added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Oct 21, 2024
Copy link
Member

@notJoon notJoon left a comment

Choose a reason for hiding this comment

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

I left some comments. Please check and address them. thank you!

examples/gno.land/p/demo/acl/acl.gno Outdated Show resolved Hide resolved
examples/gno.land/p/demo/acl/acl.gno Outdated Show resolved Hide resolved
// TODO: helpers to adds multiple permissions at once -> {verbs: []string{"read","write"}}.
// TODO: helpers to delete users from gorups.
// TODO: helpers to quickly reset states.
func (d *Directory) RemoveUserFromGroup(user std.Address, group string) {
Copy link
Member

Choose a reason for hiding this comment

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

Should we return an error or a boolean indicating success when removing a field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧾 package/realm Tag used for new Realms or Packages. review/triage-pending PRs opened by external contributors that are waiting for the 1st review
Projects
Status: In Progress
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants