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

Allow per node protection bypass / protection override #11 #9 #15

Merged
merged 4 commits into from
May 25, 2020

Conversation

S-S-X
Copy link
Owner

@S-S-X S-S-X commented May 22, 2020

This adds before_read and before_write callbacks.
Callback return value is checked and it it evaluates to true then read or write is allowed, if false then read/write is disallowed.

Callbacks can be overridden for each registered node, tool wide callback not available.

This also adds parameters for registered nodes:
protection_bypass_read and protection_bypass_write. Both take list of privileges and those privileges will be used to check if protections can be bypassed.
Privilege can for example be "interact" to allow everyone to bypass protection checks.

Implements #11
Dependency for #9

@S-S-X
Copy link
Owner Author

S-S-X commented May 25, 2020

Tested this a bit and everything seems to be working as it should.

@S-S-X S-S-X merged commit c6017f7 into master May 25, 2020
@S-S-X S-S-X deleted the bypassprotect branch May 25, 2020 00:30
@S-S-X S-S-X added API Metatool API issues documentation Improvements or additions to documentation labels Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Metatool API issues documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant