Repository navigation
GH Issue #1445: Check wiki TOC target container perms before render - #8127
Open
labkey-adam wants to merge 5 commits into
Open
labkey-adam wants to merge 5 commits into
labkey-adam wants to merge 5 commits into
Conversation
labkey-bpatel
left a comment
Contributor
There was a problem hiding this comment.
Manual testing looks good. Just a couple of comments below.
| JspView<VersionBean> me = HttpView.currentView(); | ||
| VersionBean bean = me.getModelBean(); | ||
| User user = getUser(); | ||
| Container c = getContainer(); |
Contributor
There was a problem hiding this comment.
The unused Container import can be removed since this line was deleted and there are no other Container usages.
| @Override | ||
| public @Nullable String getQueryString() | ||
| { | ||
| return null == _actionURL || _actionURL.getParameters().isEmpty() ? null : _actionURL.getQueryString(); |
Contributor
There was a problem hiding this comment.
Looks like this makes sense, but does this intentionally change the previous behavior where getQueryString() always returned null? (the parent method returned this.queryString, which was never set)
| policy.addRoleAssignment(SecurityManager.getGroup(Group.groupGuests), ReaderRole.class); | ||
| SecurityPolicyManager.savePolicyForTests(policy, getAdmin()); | ||
| html = renderToc(User.guest); | ||
| assertTrue("Expected guest login prompt, html was: " + html, html.contains("Please log in to see this data.")); |
Contributor
There was a problem hiding this comment.
Should this use WikiManager.get().getNoPermissionsMessage(..) like above, instead of the hard-coded text?
labkey-bpatel
approved these changes
Oct 6, 2026
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.
Rationale
Users need read permission in the target container. See this issue.
Changes
MockRequest.getQueryString()to return the query string from theActionURL, instead of always returning null