Skip to content

chore: make Acl role limit explicit#69

Closed
mooori wants to merge 1 commit into
near:masterfrom
mooori:acl-max-roles
Closed

chore: make Acl role limit explicit#69
mooori wants to merge 1 commit into
near:masterfrom
mooori:acl-max-roles

Conversation

@mooori
Copy link
Copy Markdown
Contributor

@mooori mooori commented Jan 23, 2023

Currently, if the enum that represents Acl roles has too many variants, compilation fails with an overflow error due to this type definition:

https://github.com/aurora-is-near/near-plugins/blob/dbec4424c5bbfad5fedbfcbe877ed16bacfa18f3/near-plugins-derive/src/access_control_role.rs#L194-L198

This might be hard to understand for developers using the plugin. The changes in this PR produce a more helpful error in case there are too many enum variants. In addition, an upcoming PR will rely on that limit, so better to have it explicitly defined.

@mooori
Copy link
Copy Markdown
Contributor Author

mooori commented Jan 23, 2023

CI failure is due to the PR being based on a external repo. Closing this in favor of #70, which is identical except that it’s based on a branch of this repo.

@mooori mooori closed this Jan 23, 2023
@mooori mooori deleted the acl-max-roles branch January 23, 2023 14:35
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.

1 participant