Skip to content

Allow site administrators to change the default editor for other users.#104

Merged
ironprogrammer merged 2 commits into
WordPress:masterfrom
jakeparis:allow-admins-to-edit-other-users
Jun 24, 2024
Merged

Allow site administrators to change the default editor for other users.#104
ironprogrammer merged 2 commits into
WordPress:masterfrom
jakeparis:allow-admins-to-edit-other-users

Conversation

@jakeparis

Copy link
Copy Markdown
Contributor

Currently, site administrators and superadmins can't change the default editor for users on their site. This PR adds that functionality.

@ironprogrammer ironprogrammer force-pushed the allow-admins-to-edit-other-users branch from 58ddd01 to 42d64bf Compare June 20, 2024 23:31
@ironprogrammer

ironprogrammer commented Jun 20, 2024

Copy link
Copy Markdown
Member

Thank you for contributing to Classic Editor, @jakeparis!

This is a useful update that can make administrators' (and their users'!) lives easier 👍🏻 I've rebased the PR along with a minor tweak to the user ID variable name.

@ironprogrammer

Copy link
Copy Markdown
Member

Test Report

Steps to Test

  1. As an admin user, in Settings > Writing, enable the "Allow users to switch editors" setting.
    writing-settings
  2. From the Users screen, edit another user (not your own).
  3. Change the "Default Editor" choice for the user and click Update User to save their profile.
    edit-user
  4. Using a plugin such as User Switching or a separate browser, log in as the updated user and go to Posts > Add New Post.
  5. Confirm that the default editor type matches what was set by the admin user.

Expected Results

  • ✅ Admin users can set the default editor for other users.
  • ✅ Users' default editor option matches that set by an admin.

Environment

  • Hardware: MacBook Pro Apple M1 Pro
  • OS: macOS 14.5
  • Browser: Safari 17.5
  • Server: nginx/1.27.0
  • PHP: 8.2.20
  • MySQL: 8.0.27
  • WordPress: 6.6-beta3-58440-src
  • Active Plugins:
    • classic-editor v1.6.3
    • user-switching v1.7.3

Actual Results

  • ✅ Admin users can set the default editor for other users.
  • ✅ Users' default editor option matches that set by an admin.
  • ✅ Also verified that users can reset their own default editor, and that selecting an editor type per-post works as expected.

@ironprogrammer ironprogrammer merged commit 8b1fd08 into WordPress:master Jun 24, 2024
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.

2 participants