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

Author selection for Pages should not include users with roles lower than Editor #19886

Closed
twstokes opened this issue Jan 11, 2023 · 2 comments
Closed

Comments

@twstokes
Copy link
Contributor

twstokes commented Jan 11, 2023

Expected behavior

List doesn't contain users who have a role lower than Editor.

Actual behavior

List contains users who have a role lower than Editor, although they cannot technically publish Pages.

When tapping Publish:

  • Self-hosted sites without a WordPress.com connection do not throw an error.
  • WordPress.com sites throw an error from the backend that is presented by the user interface.
Error Domain=WordPressKit.WordPressComRestApiError Code=2 "Assigned author cannot publish post." UserInfo={NSLocalizedDescription=Assigned author cannot publish post., WordPressComRestApiErrorCodeKey=unauthorized, WordPressComRestApiErrorMessageKey=Assigned author cannot publish post.}

Steps to reproduce the behavior

Prerequisites: Two users exist on a blog - one Administrator role, and one lower than Editor (e.g. Author or Contributor).

  1. Log into the app as the Administrator user
  2. Tap the FAB and select Site page to create a page
  3. Choose any layout
    • ℹ️ If the Blank Page layout was chosen, populate a title
  4. In the Page settings tap Author
  5. Observe: The list of users

Notes

WordPress.com's web interface (Calypso) allows one of these users to be set and for the Page to be published without error.

Tested on iPhone 14, iOS 16.2, WPiOS 21.5
@twstokes
Copy link
Contributor Author

WPAndroid issue: wordpress-mobile/WordPress-Android#17739

@kean
Copy link
Contributor

kean commented May 1, 2024

This now works better as the error message contains the reason why it fails, which I think is an acceptable solution:

– less logic to be hardcoded in the app
– no guessing why a user is missing from the list

@kean kean added this to the 24.9 milestone May 1, 2024
@kean kean closed this as completed May 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants