Topic on Extension talk:Whitelist Pages

Whitelisting Semantic Mediawiki (SMW) Results

6
Revansx (talkcontribs)

Does this extension whitelist the wiki article wikitext or the fully processed page (including any semantic query results)

Specifically, is it possible to use this extension to whitelist semantic data?

Thanks!

/Rich

Thomas-topway-it (talkcontribs)

hello @Revansx Richard, I answer this message because recently I came across your idea to whitelist specific api calls. This could be done recording semantic data within a slot, querying them with an api call like the following

https://wikienterprise.org/w/api.php?action=query&format=json&prop=revisions&titles=Main%20Page&rvprop=timestamp%7Ccontent%7Ccontentmodel%7Cslotsize&rvslots=pageproperties

(originally proposed by Derk-Jan @TheDJ, with rvslots=*) and then whitelisting the api call using your idea. (using a regex for the titles parameter)

Revansx (talkcontribs)

Hi @Thomas-topway-it, thank you for the response.

So, iiuc you are saying I could:

  1. add some semantic data to a page (say Main Page) like [[Has Prop1::xyz]]
  2. then whitelist that page (Main Page)

then from some client location I can anonymously:

  1. curl the wiki's api.php page using the the following parameters:
    1. action = query
    2. format = json
    3. prop = revisions
    4. titles = Main Page
    5. rvprop = timestamp|content|contentmodel|slotsize
    6. rvslots = pageproperties

and the response will all the semantic properties in the page returned as JSON?

Is that right?

Thomas-topway-it (talkcontribs)
Revansx (talkcontribs)

ah, right!

ref:

Add to LocalSettings.php:

if ( {$_SERVER['REQUEST_URI']} == "/api.php?action=query&...") {
  $wgGroupPermissions['*']['readapi'] = true;
}

Thanks!

/Rich

Thomas-topway-it (talkcontribs)

or replace 'readapi' with 'read'

Reply to "Whitelisting Semantic Mediawiki (SMW) Results"