Skip to content

Add functions acl_get_{admins, grantees}#12

Merged
mfornet merged 3 commits into
near:aclfrom
mooori:acl-iter
Oct 11, 2022
Merged

Add functions acl_get_{admins, grantees}#12
mfornet merged 3 commits into
near:aclfrom
mooori:acl-iter

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Oct 7, 2022

Note To be merged after #8 and #9. Once they are merged, I'll rebase this PR. Until then, the diff here on github is messy (hence still in draft mode). After the rebase, only the most recent commit should remain in this PR.

Overview

Adds methods to retrieve the admins and grantees of roles.

  • Trait methods are added to AccessControllable:
    • acl_get_admins
    • acl_get_grantees
  • The attribute #[access_controllable] adds implementations of these methods.
  • The new methods are tested in near-plugins/tests/access_controllable.rs
# Command to execute the tests:
cargo test --test access_controllable

# This makes `workspaces` write more than 1G to /tmp (on my machine).
# Depending on the size of your /tmp, a cleanup might be required afterwards.
du --summarize --total --human-readable /tmp/sandbox-*
rm -r /tmp/sandbox-*

@mfornet mfornet marked this pull request as ready for review October 11, 2022 16:39
@mfornet mfornet self-requested a review October 11, 2022 16:40
@mfornet mfornet merged commit fed0437 into near:acl Oct 11, 2022
@SteMak SteMak mentioned this pull request Mar 27, 2023
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