Clarify Unrestricted Preview Access setting description (#2133) - #3270
Open
faisalahammad wants to merge 1 commit into
Open
Clarify Unrestricted Preview Access setting description (#2133)#3270faisalahammad wants to merge 1 commit into
faisalahammad wants to merge 1 commit into
Conversation
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.
Summary
Updates the description of the Unrestricted Preview Access setting to state that bypassing restrictions also requires the user to be able to edit the content. The current description promises a blanket bypass but never mentions the edit-capability check that
llms_can_user_bypass_restrictions()has enforced since v5.9 (a deliberate security fix from #1974 / #1987 to stop instructors of one course bypassing restrictions on another). This is a documentation-only change. No logic, signature, or filter changed.Fixes #2133
Changes
includes/admin/settings/class.llms.settings.general.phpBefore:
After:
Why: The setting id
llms_grant_site_accessfeeds the allowlist, but the bypass only applies when the user also holds edit capability for the specific post. The description now matches the actual behavior, so admins are not surprised that an instructor assistant enrolled as a student in a course cannot bypass its drip locks.Testing
Test 1: setting description renders correctly
Result: the description includes the second sentence noting the edit-capability requirement.
Test 2: role multi-select still saves
Result: the selection persists and no PHP warnings show.
Screenshot