Page MenuHomePhabricator

"uploader" group for viwiki
Closed, ResolvedPublic

Description

Per viwiki community consensus, please create a group named uploader that have the following right:

  • Upload files from a URL (upload_by_url)

The whitelist (i.e. $wgCopyUploadsDomains) should only include upload.wikimedia.org. That being said, flickr.com and staticflickr.com are not allowed.
Sysops should be able to grant this flag. Also, the flag should be bundled into eliminator and sysop toolsets.
Thanks in advance.

Event Timeline

@Stang I'm pretty sure that I uploaded a file to testwiki before opening discussion, and have just tried again. Both succeeded, here's the response, no abnormal warnings:

{
    "upload": {
        "result": "Success",
        "filename": "Cc-sa_white-foobar.svg",
        "warnings": {
            "duplicate": [
                "Cc-sa_white.svg",
                "Foobar.svg"
            ]
        },
        "imageinfo": {
            "timestamp": "2022-03-22T14:03:18Z",
            "user": "NguoiDungKhongDinhDanh",
            "userid": 50179,
            "size": 3883,
            "width": 64,
            "height": 64,
            "parsedcomment": "",
            "comment": "",
            "html": "<p>A file with this name exists already, please check <strong><a class=\"mw-selflink selflink\">File:Cc-sa white-foobar.svg</a></strong> if you are not sure if you want to change it.\n</p>\n<figure class=\"mw-default-size\" typeof=\"mw:Error mw:Image/Thumb\"><a href=\"/w/index.php?title=Special:Upload&amp;wpDestFile=Cc-sa_white-foobar.svg\" class=\"new\" title=\"File:Cc-sa white-foobar.svg\"><span class=\"mw-broken-media\" data-width=\"180\">File:Cc-sa white-foobar.svg</span></a><figcaption></figcaption></figure>",
            "canonicaltitle": "File:Cc-sa white-foobar.svg",
            "url": "https://upload.wikimedia.org/wikipedia/test/c/c1/Cc-sa_white-foobar.svg",
            "descriptionurl": "https://test.wikipedia.org/wiki/File:Cc-sa_white-foobar.svg",
            "sha1": "8ed3becd058692da470fee619bdeb206118a0b9a",
            "metadata": [
                {
                    "name": "version",
                    "value": 2
                },
                {
                    "name": "width",
                    "value": 64
                },
                {
                    "name": "height",
                    "value": 64
                },
                {
                    "name": "originalWidth",
                    "value": "64"
                },
                {
                    "name": "originalHeight",
                    "value": "64"
                },
                {
                    "name": "metadata",
                    "value": "<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:cc=\"http://web.resource.org/cc/\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n      <cc:Work rdf:about=\"\">\n        <dc:format>image/svg+xml</dc:format>\n        <dc:type rdf:resource=\"http://purl.org/dc/dcmitype/StillImage\"/>\n      </cc:Work>\n    </rdf:RDF>"
                },
                {
                    "name": "translations",
                    "value": []
                }
            ],
            "commonmetadata": [],
            "extmetadata": {
                "DateTime": {
                    "value": "2022-03-22 14:02:39",
                    "source": "mediawiki-metadata",
                    "hidden": ""
                },
                "ObjectName": {
                    "value": "Foobar",
                    "source": "mediawiki-metadata",
                    "hidden": ""
                },
                "CommonsMetadataExtension": {
                    "value": 1.2,
                    "source": "extension",
                    "hidden": ""
                },
                "Categories": {
                    "value": "",
                    "source": "commons-categories",
                    "hidden": ""
                },
                "Assessments": {
                    "value": "",
                    "source": "commons-categories",
                    "hidden": ""
                }
            },
            "mime": "image/svg+xml",
            "mediatype": "DRAWING",
            "bitdepth": 0
        }
    }
}

Sounds reasonable, and I suggest to leave a comment in the previously mentioned task (btw my community has been blocked on it for more than five years in T142991, pretty happy if you are willing to push it forward).

Change 783918 had a related patch set uploaded (by Juan90264; author: Juan90264):

[operations/mediawiki-config@master] Create 'uploader' group for viwiki

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

Change 783918 merged by jenkins-bot:

[operations/mediawiki-config@master] Create 'uploader' group for viwiki

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

Juan90264 moved this task from Resolved to Working on on the User-Juan90264 board.

Change 784717 had a related patch set uploaded (by Juan90264; author: Juan90264):

[operations/mediawiki-config@master] Enable '$wgCopyUploadsDomains' to viwiki

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

Change 784717 merged by jenkins-bot:

[operations/mediawiki-config@master] Enable '$wgCopyUploadsDomains' to viwiki

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

Change 785208 had a related patch set uploaded (by Juan90264; author: Juan90264):

[operations/mediawiki-config@master] Fix: Enable '$wgCopyUploadsDomains' to viwiki

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

This probably need a small fix: eliminators should be able to upload_by_url as well.

Change 785208 merged by jenkins-bot:

[operations/mediawiki-config@master] Fix: Enable '$wgCopyUploadsDomains' to viwiki

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

Mentioned in SAL (#wikimedia-operations) [2022-05-03T20:53:56Z] <cjming@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:785208|Fix: Enable '$wgCopyUploadsDomains' to viwiki (T303577)]] (duration: 00m 50s)

This probably need a small fix: eliminators should be able to upload_by_url as well.

(now like this) The new user group 'uploader' is now working with upload_by_url available, also for the eliminators. https://vi.wikipedia.org/w/index.php?title=%C4%90%E1%BA%B7c_bi%E1%BB%87t:Danh_s%C3%A1ch_th%C3%A0nh_vi%C3%AAn&group=uploader and https://vi.wikipedia.org/wiki/%C4%90%E1%BA%B7c_bi%E1%BB%87t:Quy%E1%BB%81n_nh%C3%B3m_ng%C6%B0%E1%BB%9Di_d%C3%B9ng

Juan90264 moved this task from Working on to Resolved on the User-Juan90264 board.

@Juan90264 Sorry for bugging you (again). It appear that sysops are not granted by default. Please fix it. Thanks a lot in advance.

Change 791430 had a related patch set uploaded (by Stang; author: Stang):

[operations/mediawiki-config@master] viwiki: Enable "upload_by_url" for sysop

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

Change 791430 merged by jenkins-bot:

[operations/mediawiki-config@master] viwiki: Enable "upload_by_url" for sysop

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