https://bugzilla.wikimedia.org/show_bug.cgi?id=47348

       Web browser: ---
            Bug ID: 47348
           Summary: intermittent: Trying to get patrol token via API fails
                    with "Action 'patrol' is not allowed for the current
                    user", even though user has patroller rights.
           Product: MediaWiki
           Version: 1.22-git
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

api call is
action: 'query', list: 'recentchanges', rctoken: 'patrol', rclimit: 1

this is done through a script. 

the script is:

snippet of the script is:

mw.loader.using('mediawiki.api', function() {

function tokenReceived(data) {
    var token = data.query.recentchanges[0].patroltoken;
 // do something with token - usually mark some edits as "patrolled".
}

var api = new mw.Api()
api.get({ list: 'recentchanges', rclimit: 1, rctoken: 'patrol')

}); // using

recently this call intermittently generates a result where
"data.query.recentchanges[0]" has no token field, and "data" grows a new field:
"warnings", such that "data.warnings.recentchanges['*']" is the string
"Action 'patrol' is not allowed for the current user".
(even though the logged in user has "patroller" rights)

this seems to be an intermittent error - sometimes it actually returns a good
token.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to