Page MenuHomePhabricator

Allow editing of "about" with less rights
Closed, ResolvedPublic

Description

It would be great to allow editing of the about section for all logged-in users, not just functioneers, ideally sooner than our functioneer roll-out would do that.

I understand that we lack T301667 which makes this potentially difficult.

On the good side, we have a specific button or two for editing the about section, and the function editor also seems to be configurable to allow for that. It would be great to enable this, if this is not too much effort, as it could offer something to do for more people while waiting for the functioneer rights.

(Given that we need to have this enabled for the built-in objects anyway, maybe there's just a config to be set?)

Event Timeline

DVrandecic triaged this task as Medium priority.Aug 3 2023, 2:51 AM
DVrandecic moved this task from To triage to Backlog on the Abstract Wikipedia team board.

I think this should be blocked on T301667: Use Roles to determine what features are shown to the user in the frontend code; the front end is already a warren of assumptions about what users can do what, and this will make it worse.

I'm confused, I don't think we need T301667 for this.
Multilingual information is designed to be edited by anyone, and we already have a isUserLoggedIn getter that we use internally for activating the About widget edit (pencil) button.

the front end is already warren of assumptions about what users can do

Apart from accessing isUserLoggedIn in About and the Function definition, I don't think there's anything like that. Every decision about access rights is done in the wikilambda Authorization layer.
What am I missing?

I'm confused, I don't think we need T301667 for this.
Multilingual information is designed to be edited by anyone, and we already have a isUserLoggedIn getter that we use internally for activating the About widget edit (pencil) button.

the front end is already warren of assumptions about what users can do

Apart from accessing isUserLoggedIn in About and the Function definition, I don't think there's anything like that. Every decision about access rights is done in the wikilambda Authorization layer.
What am I missing?

Yeah, that's the problem. Right now we're showing things with assumptions in the front-end rather than checks, and adding another level of assumptions (logged in === can edit descriptions) is what I want to avoid. :-(

Change 945617 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Add 'wikilambda-edit-object-description' to granular authorization rules

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

I have added wikilambda-edit-object-description user right so that we can handle the granular edition of descriptions.
Now, any logged in user should be able to edit all the fields in the "About" widget if we add the following rights to the "user" group:

  • wikilambda-edit-object-label
  • wikilambda-edit-object-alias
  • wikilambda-edit-object-description

However, because edit pages are not reachable, normal logged in users won't be able to edit Function labels or the Key labels of a Type.

If we allow access to edit pages, then we can also add the following granular rights and allow edition of only multilingual information:

  • wikilambda-edit-argument-label
  • wikilambda-edit-key-label

Another possibility would be to include the "About widget" in the Function view page, which would allow users to edit name/description/aliases of Functions without the need to navigate to "edit" pages.

Change 945617 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Add 'wikilambda-edit-object-description' to granular authorization rules

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

Change 944864 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.20] Add 'wikilambda-edit-object-description' to granular authorization rules

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

Another possibility would be to include the "About widget" in the Function view page, which would allow users to edit name/description/aliases of Functions without the need to navigate to "edit" pages.

That is T339954, and probably worth doing but needs Product sign-off (and mean we change a bunch of the browser tests!). I really like that idea; will discuss there.

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

[operations/mediawiki-config@master] Wikifunctions: Allow logged-in users to edit object labels, aliases, and descriptions

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

Jdforrester-WMF changed the task status from Open to In Progress.Aug 3 2023, 5:48 PM
Jdforrester-WMF moved this task from Backlog to In Progress on the Abstract Wikipedia team board.

Change 944864 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.20] Add 'wikilambda-edit-object-description' to granular authorization rules

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

Redoing the type page is on the horizon, and redoing parts of the function page too, so I think this is a great step forward. Wow! I didn't think this to be done so quickly!

On Wikifunctions, with a logged in user without Functioneer rights, I don't seem to be able to edit labels.

  • go to https://www.wikifunctions.org/view/en/Z10001 with an account without Functioneer rights, but logged in (I used User:Denny account (who is not a Functioneer right now, in order to test this))
  • click on "2 languages" in the About box
  • click on "Add language"
  • select "German" as the language
  • enter in the field Labels "verbinde "Hello, " und "World!""
  • click on "Continue to publish"
  • add a summary "+de label"
  • click on "Publish"

I get the message "User does not have permission to edit"

Change 945756 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Remove 'wikilambda-edit' as default right

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

Change 945756 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Remove 'wikilambda-edit' as default right; re-label to make clear

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

Change 945664 had a related patch set uploaded (by Jforrester; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.20] Remove 'wikilambda-edit' as default right; re-label to make clear

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

Change 945664 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@wmf/1.41.0-wmf.20] Remove 'wikilambda-edit' as default right; re-label to make clear

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

Mentioned in SAL (#wikimedia-operations) [2023-08-04T12:25:16Z] <jforrester@deploy1002> Synchronized php-1.41.0-wmf.20/extensions/WikiLambda: T343380 and T343400 (duration: 10m 12s)

On Wikifunctions, with a logged in user without Functioneer rights, I don't seem to be able to edit labels.

  • go to https://www.wikifunctions.org/view/en/Z10001 with an account without Functioneer rights, but logged in (I used User:Denny account (who is not a Functioneer right now, in order to test this))
  • click on "2 languages" in the About box
  • click on "Add language"
  • select "German" as the language
  • enter in the field Labels "verbinde "Hello, " und "World!""
  • click on "Continue to publish"
  • add a summary "+de label"
  • click on "Publish"

I get the message "User does not have permission to edit"

Yup, that's working as expected until I deploy the config change on Monday. I now have faith (thanks to Geno!) that it will then work, rather than error for a different right.

Change 945624 merged by jenkins-bot:

[operations/mediawiki-config@master] Wikifunctions: Allow logged-in users to edit object labels, aliases, and descriptions

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

Mentioned in SAL (#wikimedia-operations) [2023-08-07T16:11:32Z] <jforrester@deploy1002> Started scap: Backport for [[gerrit:945624|Wikifunctions: Allow logged-in users to edit object labels, aliases, and descriptions (T343400)]]

Mentioned in SAL (#wikimedia-operations) [2023-08-07T16:13:02Z] <jforrester@deploy1002> jforrester: Backport for [[gerrit:945624|Wikifunctions: Allow logged-in users to edit object labels, aliases, and descriptions (T343400)]] synced to the testservers mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, and mw-debug kubernetes deployment (accessible via k8s-experimental XWD option)

Mentioned in SAL (#wikimedia-operations) [2023-08-07T16:18:43Z] <jforrester@deploy1002> Finished scap: Backport for [[gerrit:945624|Wikifunctions: Allow logged-in users to edit object labels, aliases, and descriptions (T343400)]] (duration: 07m 11s)

Etonkovidova subscribed.

On Wikifunctions, with a logged in user without Functioneer rights, I don't seem to be able to edit labels.

  • go to https://www.wikifunctions.org/view/en/Z10001 with an account without Functioneer rights, but logged in (I used User:Denny account (who is not a Functioneer right now, in order to test this))
  • click on "2 languages" in the About box
  • click on "Add language"
  • select "German" as the language
  • enter in the field Labels "verbinde "Hello, " und "World!""
  • click on "Continue to publish"
  • add a summary "+de label"
  • click on "Publish"

I get the message "User does not have permission to edit"

Run the scenario above after the patch deployment - works as expected (Autoconfirmed user).