Repository navigation
test: require the permission refusal in the restricted-admin apply check - #118
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Follow-up to #115. The apply check for the existing `restricted` user only asserted that nothing was written. The placeholder plan id is rejected by the page whether or not the permission check runs, so the check passed without exercising it. #115 fixed the same weakness for `nodisabled` by also requiring the refusal text. Now the apply response must contain "do not cover every device" for `restricted` too, and the no-write assertion is a separate check. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
…pply check imp_apply discarded the response, so the restricted import apply was only checked for writing nothing, which a stale plan id also satisfies. It now keeps the body in $WORK/imp-apply.out (callers are unchanged) and the restricted apply must contain "do not cover every device"; the no-write check stays separate. Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
somethingwithproof
force-pushed
the
fix/permissions-e2e-restricted-apply
branch
from
November 20, 2026 09:19
b2a52e5 to
b9d896c
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Follow-up to #115
Intent: the
restricteduser's config and import apply checks only asserted that nothing was written. The page rejects a placeholder or stale plan id whether or not the permission check runs, so they proved nothing about the permission. #115 fixed this fornodisabled.Changed (tests/permissions-e2e.sh only): the apply response for
restrictedmust contain "do not cover every device", for the config apply and the import apply; the no-write assertions are separate checks.imp_applynow keeps the response body in$WORK/imp-apply.outinstead of discarding it; existing callers are unchanged.Verification: the permissions e2e job passes on both Cacti versions. Locally, the suite passes on main's code; with the permission refusal disabled in an uncommitted patch,
config-apply-refused-restricted-adminandimport-apply-refused-restricted-adminFAIL while the no-write checks still pass.Risk: test-only.