Page MenuHomePhabricator

User rights: Logged in users can edit user-contributed functions that are not-running
Closed, ResolvedPublic

Description

Description

NOTE: this task doesn't include the function multilingual information (name, description, aliases and argument labels), this is covered by the task T349063
Goal

Any logged in user should be able to edit functions when:

  • the function is a user contributed functions, and
  • if editing input/output, the function is not running

Details
  1. When the function is predefined function:
    • Only function maintainers can edit them. Rights needed: [ wikilambda-edit-predefined ]
  1. When the function is user-contributed function:
    • Edit inputs/Z8K1 or output/Z8K2:
      • If the function is running: Only function maintainers can edit them. [ wikilambda-edit-user-function, wikilambda-edit-running-function & wikilambda-edit-running-function-definition ]
      • Else: logged in user [ wikilambda-edit-user-function ]
    • Edit tests/Z8K3 or implementations/Z8K4 (connect/disconnect):
      • If the function is running:
        • connect implementations: functioneers [ wikilambda-edit-user-function, wikilambda-edit-running-function, wikilambda-connect-implementation ]
        • disconnect implementations: functioneers [ wikilambda-edit-user-function, wikilambda-edit-running-function, wikilambda-disconnect-implementation ]
        • connect tests: functioneers [ wikilambda-edit-user-function, wikilambda-edit-running-function, wikilambda-connect-test ]
        • disconnect tests: functioneers [ wikilambda-edit-user-function, wikilambda-edit-running-function, wikilambda-disconnect-test ]
      • If the function is not running:
        • connect implementations: functioneers [ wikilambda-edit-user-function, wikilambda-connect-implementation ]
        • connect tests: functioneers [ wikilambda-edit-user-function, wikilambda-connect-test ]
        • disconnect tests: functioneers [ wikilambda-edit-user-function, wikilambda-disconnect-test ]
    • Any other edits:
      • Any logged in user [ wikilambda-edit-user-function ]
Permissions involved:
  • function maintainer: [ wikilambda-edit-predefined, wikilambda-edit-running-function-definition ]
  • functioneer: [ wikilambda-edit-running-function, wikilambda-connect-*, wikilambda-disconnect-* ]
  • logged in user: [ wikilambda-edit-user-function ]

To-Do:
  • Create wikilambda-edit-running-function-definition right and assing it to functionmaintainer group
  • Remove wikilambda-edit-builtin-function right (redundant, covered by wikilambda-edit-predefined)
  • Remove wikilambda-edit-function right (redundant, covered by wikilambda-edit-predefined or wikilambda-edit-user-function)
  • Remove wikilambda-edit-function-definition right (redundant, covered by wikilambda-edit-running-function-definition, which needs a special right, because it requires more privileges than edit-running-function + edit-function-definition )
  • Set wikilambda-edit-predefined to true for the group functionmaintainer
  • Set wikilambda-edit-running-function-definition to true for the group functionmaintainer
  • Set wikilambda-edit-running-function to true for the group functioneer
  • Set wikilambda-connect-* to true for the group functioneer
  • Set wikilambda-disconnect-* to true for the group functioneer
  • Set wikilambda-edit-function-definition to true for the group user
  • Set wikilambda-edit-user-function to true for the group user

Completion checklist

Event Timeline

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

[operations/mediawiki-config@master] [wikifunctions] Alter site to General Availability

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

gengh renamed this task from User rights: Logged in users can edit user-contributed functions that are not running to User rights: Logged in users can edit user-contributed functions that are not-running.Oct 19 2023, 11:28 AM
gengh updated the task description. (Show Details)
gengh updated the task description. (Show Details)

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

[mediawiki/extensions/WikiLambda@master] Fix edit function rights and privileges for different conditions

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

Jdforrester-WMF changed the task status from Open to In Progress.Oct 19 2023, 4:38 PM
Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF moved this task from To triage to In Progress on the Abstract Wikipedia team board.

Change 967226 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Fix edit function rights and privileges for different conditions

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

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

[mediawiki/extensions/WikiLambda@master] Restore wikilambda-edit-builtin-function right

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

Change 967463 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Restore wikilambda-edit-builtin-function right

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

Change 966570 merged by jenkins-bot:

[operations/mediawiki-config@master] [wikifunctions] Alter site to General Availability

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

Mentioned in SAL (#wikimedia-operations) [2023-11-07T14:04:43Z] <jforrester@deploy2002> jforrester: Backport for [[gerrit:966570|[wikifunctions] Alter site to General Availability (T349054 T349061 T349063 T349080 T349082)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2023-11-07T14:10:17Z] <jforrester@deploy2002> Finished scap: Backport for [[gerrit:966570|[wikifunctions] Alter site to General Availability (T349054 T349061 T349063 T349080 T349082)]] (duration: 07m 00s)