Repository navigation
Show the UCP section to members who only have u_rt_number - #219
Merged
Merged
Conversation
S_RT_SHOW, the flag that renders the Recent Topics section in UCP > Board preferences, was set for u_rt_enable, u_rt_location, u_rt_sort_start_time and u_rt_unread_only, but not u_rt_number. The number field sits inside that section, so a member granted only "Can change the number of recent topics" saw no section at all. Closes #216 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #216.
Problem
ucp_prefs_get_data()setS_RT_SHOW(the flag that renders the Recent Topics section in UCP > Board preferences) foru_rt_enable,u_rt_location,u_rt_sort_start_timeandu_rt_unread_only, but notu_rt_number. The number field (A_RT_NUMBER) sits inside{% if S_RT_SHOW %}, so a member granted only "Can change the number of recent topics" saw no section at all. This was raised in the customisations team's 3.0.11 review.Fix
Add
u_rt_numberto theS_RT_SHOWcondition inevent/ucp_listener.php. One line.Tests
test_number_only_permission_shows_ucp_section: a user with onlyu_rt_viewandu_rt_numbermust getS_RT_SHOWandA_RT_NUMBER. It failed before the fix (S_RT_SHOWunset).tests/tests.mdupdated. Unit suite: 90 tests, 0 failures, run locally. CI result to follow.A_RT_NUMBERis inside{% if S_RT_SHOW %}inucp_prefs_view_select_menu_append.html.This folds into 3.0.12; its changelog line comes with the 3.0.12 changelog update.
🤖 Generated with Claude Code