Skip to content

Add functions to manage Acl roles#9

Merged
mfornet merged 2 commits into
near:aclfrom
mooori:acl-role
Oct 11, 2022
Merged

Add functions to manage Acl roles#9
mfornet merged 2 commits into
near:aclfrom
mooori:acl-role

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Oct 6, 2022

Note: To be merged after #8. Once #8 is merged I'll rebase this PR, until then the diff here on github is messy: Only the two most recent commits will remain in this PR, previous commits belong to #8.

Overview

  • Trait methods are added to AccessControllable:
    • acl_grant_role
    • acl_revoke_role
    • acl_renounce_role
    • acl_revoke_role_unchecked
  • 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-*

@mooori mooori marked this pull request as ready for review October 6, 2022 08:47
@mfornet mfornet self-requested a review October 6, 2022 09:23
@mooori
Copy link
Copy Markdown
Contributor Author

mooori commented Oct 7, 2022

Converting to draft since it'll need to be updated after deciding how to handle *_unchecked methods in #8.

@mooori mooori marked this pull request as draft October 7, 2022 09:34
@mfornet mfornet marked this pull request as ready for review October 11, 2022 17:54
@mfornet mfornet merged commit 32dd54d into near:acl Oct 11, 2022
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