WordPress.org

Making WordPress.org

Opened 3 months ago

Closed 7 weeks ago

#4700 closed task (fixed)

HelpHub & Rosetta Site role conflict

Reported by: Nao Owned by: clorith
Milestone: Priority: normal
Component: HelpHub Keywords: has-patch
Cc:

Description

On a Rosetta site, users can’t have HelpHub role assigned if they already have a /support/ site role.

Steps to reproduce

  1. Go to https://ja.wordpress.org/support/wp-admin/users.php (or any other Rosetta site) and assign a user "Subscriber" role using the "Change role to..." dropdown.
  2. Go to https://ja.wordpress.org/support/users/USERNAME screen.

This screen should show “HelpHub Role” section but it doesn’t appear if the user has a site role.
If you remove the Subscriber role, the section will show up.

Users should be able to have both HelpHub & Site roles so that HelpHub Admins of a Rosetta site can also edit things like widget and menu.

See: https://wordpress.slack.com/archives/CG47GT4G2/p1565919522045500

Attachments (1)

4700.patch (1.9 KB) - added by Clorith 2 months ago.

Download all attachments as: .zip

Change History (6)

This ticket was mentioned in Slack in #docs by nao. View the logs.


3 months ago

This ticket was mentioned in Slack in #polyglots by nao. View the logs.


3 months ago

@Clorith
2 months ago

#3 @Clorith
2 months ago

  • Keywords has-patch added; needs-patch removed

4700.patch should, for the most part, solve this, but with one thing to take note of.

The HelpHub roles are just copying the regular post capabilities in WordPress already, so the attached patch checks if a user can edit posts, if they can't, then the management form shows up (that means for a subscriber, it will show up), but it will still be hidden for an author or editor, as they will already have access to these things already, and we do not want ot accidentally overwrite an existing role with higher access.

The patch also fixes a capability assigned to HelpHub Editors that I noticed gives the access to the customizer, this is now left purely for Managers. The reason for this access is to define the menus of the site, which are used to set up content blocks on the front page to make it simple for all to use, but a regular editor should not be making these changes.

This ticket was mentioned in Slack in #docs by nao. View the logs.


2 months ago

#5 @tellyworth
7 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 9159:

HelpHub: fix role assignment for support users.

This fixes a conflict that made it impossible to set a HelpHub role for users with an existing support role.

It also removes an unnecessary edit_theme_options capability for HelpHub editors.

Props Clorith.
Fixes #4700.

Note: See TracTickets for help on using tickets.