Page MenuHomePhabricator

User functionmaintainer and functioneer cannot edit a non-attached implementation
Closed, ResolvedPublicBUG REPORT

Description

Description

As a functionmaintainer and functioneer user, when trying to edit a detached implementation, I get the following error:

{
    "error": {
        "code": "wikilambda-zerror",
        "info": "ZError of type Z557",
        "message": "User does not have permission to edit",
        "zerror": {
            "Z1K1": "Z5",
            "Z5K1": "Z557",
            "Z5K2": {
                "Z1K1": {
                    "Z1K1": "Z7",
                    "Z7K1": "Z885",
                    "Z885K1": "Z557"
                },
                "K1": "You are not allowed to execute the action you have requested."
            }
        },
        "labelled": {
            "type": "Error",
            "error type": "User does not have permission to edit",
            "error value": {
                "type": {
                    "type": "Function call",
                    "function": "Errortype to type",
                    "errortype": "User does not have permission to edit"
                },
                "message": "You are not allowed to execute the action you have requested."
            }
        },
        "docref": "See http://localhost:8080/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."
    },
    "servedby": "0c551529cc96"
}

Expected behavior/Acceptance criteria (returned value, expected error, performance expectations, etc.)

  • Any users can change an implementation that’s not attached, even if it’s an implementation for ANY function (builtin or user)

Completion checklist

Event Timeline

This should be looking for the wikilambda-edit-user-function right if you're changing the type, and wikilambda-edit-object-label if you're changing the labels. What kind of edit did you try to make?

Change 934645 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] tests: Add some testing of 'wikilambda-edit-user-function' etc. rights

https://gerrit.wikimedia.org/r/934645

Change 934646 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Rights: Allow regular users to edit unattached functions

https://gerrit.wikimedia.org/r/934646

Change 934645 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] tests: Add some testing of 'wikilambda-edit-user-function' etc. rights

https://gerrit.wikimedia.org/r/934645

Change 934646 merged by Jforrester:

[mediawiki/extensions/WikiLambda@master] Rights: Allow regular users to edit unattached functions

https://gerrit.wikimedia.org/r/934646

DVrandecic subscribed.

Seems to work.