Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jakeparis
Copy link

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
Copy link
Collaborator

ironprogrammer commented Jun 20, 2024

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
Collaborator

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.

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.

None yet

2 participants