Skip to content

Show the UCP section to members who only have u_rt_number - #219

Merged
avandenberghe merged 1 commit into
develop33from
issue-216-ucp-number-only
Oct 4, 2026
Merged

avandenberghe merged 1 commit into
develop33from
issue-216-ucp-number-only

Conversation

@avandenberghe

Copy link
Copy Markdown
Collaborator

Closes #216.

Problem
ucp_prefs_get_data() set S_RT_SHOW (the flag that renders the Recent Topics section in UCP > Board preferences) 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 (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_number to the S_RT_SHOW condition in event/ucp_listener.php. One line.

Tests

  • New test_number_only_permission_shows_ucp_section: a user with only u_rt_view and u_rt_number must get S_RT_SHOW and A_RT_NUMBER. It failed before the fix (S_RT_SHOW unset).
  • tests/tests.md updated. Unit suite: 90 tests, 0 failures, run locally. CI result to follow.
  • Not rendered on the board: that would need a member with only this permission in a logged-in UCP session. The template side is structural: A_RT_NUMBER is inside {% if S_RT_SHOW %} in ucp_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

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>
@avandenberghe
avandenberghe merged commit ee571ed into develop33 Oct 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UCP shows no Recent Topics section to a member who only has u_rt_number

1 participant