WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 5 days ago

#44833 assigned defect (bug)

Return a more accurate error message when user cannot perform the requested action

Reported by: desrosj Owned by: desrosj
Milestone: Future Release Priority: normal
Severity: normal Version: 4.9.6
Component: Privacy Keywords: has-patch needs-testing
Focuses: administration Cc:

Description

When a user attempts to export or erase personal data, the export_others_personal_data and erase_others_personal_data & delete_users capabilities (respectively) are checked for the current user.

If these checks fail, Invalid Request. is returned as an error message. A more accurate error message should be returned that indicates the user does not have the required permission to perform the requested action.

Attachments (2)

44833-error-message.patch (1.1 KB) - added by jplojohn 5 months ago.
44833.diff (1012 bytes) - added by mmuhsin 5 months ago.

Download all attachments as: .zip

Change History (11)

#1 @jplojohn
5 months ago

  • Keywords has-patch added; needs-patch removed

I have added a patch file which provides more useful error descriptions for the user.

This is my first time contributing - I'm fairly sure this is correct in both code and procedure, but I may have misread the handbook!

@mmuhsin
5 months ago

#2 @mmuhsin
5 months ago

I just submitted a patch. Instead of 'Invalid Request.', I changed the message to read 'Sorry, you do not have permission to perform this task.'.

#3 @idea15
5 months ago

  • Owner set to javorszky
  • Status changed from new to assigned

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.


4 months ago

#5 @pento
4 months ago

  • Milestone changed from 4.9.9 to Future Release

This ticket was mentioned in Slack in #core-privacy by webdevlaw. View the logs.


4 months ago

#7 @desrosj
2 months ago

  • Owner changed from javorszky to desrosj

#8 @garrett-eclipse
5 days ago

  • Keywords good-first-bug removed

#9 @garrett-eclipse
5 days ago

  • Keywords needs-testing added
Note: See TracTickets for help on using tickets.