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(core): add option to hide existence of not-permitted commands #692

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jpenilla
Copy link
Member

@jpenilla jpenilla commented Feb 21, 2024

Adds an option so that when the sender is permitted to use a following or preceding node to the one parsed, an invalid syntax exception is returned instead of no permission. Maybe this option should also convert other no permission exceptions to unknown command? Or users could do that via the exception handling system.

Should this be expanded to invalid sender exceptions as well? (probably)

Copy link

github-actions bot commented Feb 21, 2024

Test Results

 84 files  ±0   84 suites  ±0   13s ⏱️ ±0s
417 tests +1  417 ✅ +1  0 💤 ±0  0 ❌ ±0 
461 runs  +1  461 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit f1b833b. ± Comparison against base commit c3c3f23.

This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.
org.incendo.cloud.PermissionTest ‑ testPermittedNodeFollowingNotPermittedNode()
org.incendo.cloud.PermissionTest ‑ [1] expectedException=class org.incendo.cloud.exception.NoPermissionException, settings=[]
org.incendo.cloud.PermissionTest ‑ [2] expectedException=class org.incendo.cloud.exception.InvalidSyntaxException, settings=[HIDE_COMMAND_EXISTENCE]

♻️ This comment has been updated with latest results.

Base automatically changed from permission-fix to master February 24, 2024 20:16
@jpenilla jpenilla force-pushed the convert-permission-exceptions branch from b225229 to ab9bbbf Compare February 24, 2024 20:20
@jpenilla jpenilla force-pushed the convert-permission-exceptions branch from ab9bbbf to 42827d4 Compare February 25, 2024 20:38
@jpenilla jpenilla changed the title Return syntax instead of no permission in some cases feat(core): add option to hide existence of not-permitted commands Feb 25, 2024
@jpenilla jpenilla marked this pull request as ready for review February 25, 2024 20:55
@jpenilla jpenilla marked this pull request as draft February 25, 2024 20:58
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