Page MenuHomePhabricator

Show a better error message and give them somewhere to go when a user tries to create/edit an unauthorised ZObject (e.g. making a new language)
Open, MediumPublicBUG REPORT

Description

Description

When a user tries to create a new ZNaturalLanguage etc. that they're not authorised to make, there are no warnings show in the editor as they're creating it, and when trying to publish they get only the generic "User does not have permission to edit" message.

Desired behavior/Acceptance criteria

  • When showing the error on attempted publication, don't just show the main error message, but also the secondary information about what specifically is not allowed (e.g. "creating a new programming language object").
  • When a user is trying to create one of the common restricted types (Z4, Z60, Z61), detect this and show a message as they edit that it is not allowed.
  • In both of the above, link to a user-facing documentation page for each type (to create?) for how to get such things created, rather than stranding the user.

Completion checklist

  • Functionality:
    • The solution meets the expected behavior/acceptance criteria described above
    • All the child tasks are closed
    • The issue has been peer reviewed
    • The issue has been merged
  • Engineering:
    • There are existing and passing unit/integration tests effectively testing its success and its failure
    • All new classes/methods are covered by unit tests
  • Design:
    • Design review of live version in accordance to design standards
  • Documentation:
    • All new functions/methods are annotated
  • Accessibility:
    • New functionality is compared against the Accessibility guide for developers
    • Accessibility concerns are either address or, if the work is sufficiently large, a new Phabricator ticket is created and linked to this ticket
    • All user facing strings are internationalized

Event Timeline

Aklapper renamed this task from Problem with not being able to create ZObject to Cannot create ZObject: "User does not have permission to edit".Nov 18 2023, 11:12 AM

What kind of object were you trying to create? Many special kinds of objects are locked down to prevent breaking the system.

What kind of object were you trying to create? Many special kinds of objects are locked down to prevent breaking the system.

Hi @Jdforrester-WMF, I'm trying to create Turkic languages such as Turkish and Azerbaijani.

Turkish already exists as Z1237 and Azerbaijani as Z1597. Languages are some of the "special kinds of objects" thus locked down.

Turkish already exists as Z1237 and Azerbaijani as Z1597. Languages are some of the "special kinds of objects" thus locked down.

Yes. We should improve the user-facing error to explain what kind of content they can't edit in the interface; will re-purpose this task.

Jdforrester-WMF renamed this task from Cannot create ZObject: "User does not have permission to edit" to Show a better error message and give them somewhere to go when a user tries to create/edit an unauthorised ZObject (e.g. making a new language).Nov 21 2023, 2:33 PM
Jdforrester-WMF updated the task description. (Show Details)

@Mahir256, actually, that's not what I meant. Similarly, I was trying to add other Turkic languages (like Tuvan)