Incendo / cloud

Command framework & dispatcher for the JVM
https://cloud.incendo.org
MIT License
433 stars 54 forks source link

feat(core): add option to hide existence of not-permitted commands #692

Open jpenilla opened 8 months ago

jpenilla commented 8 months ago

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)

github-actions[bot] commented 8 months ago

Test Results

 84 files  ±0   84 suites  ±0   13s :stopwatch: ±0s 417 tests +1  417 :white_check_mark: +1  0 :zzz: ±0  0 :x: ±0  461 runs  +1  461 :white_check_mark: +1  0 :zzz: ±0  0 :x: ±0 

Results for commit f1b833b0. ± Comparison against base commit c3c3f230.

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] ```

:recycle: This comment has been updated with latest results.