Permalink: http://tinyurl.com/66pzgj
public. Check one or more resources if given operation is allowed.
| Name | Type | Description |
| userid | string | either an integer user ID, "current", or "=" followed by a double uri-encoded user name |
Input:
<pages>
<page id="{int}"/>
...
</pages> Output:
<pages>
<page id="{int}" href="{uri}">
<title>{text}</title>
<path>{text}</path>
</page>
...
</pages>Use GET:site/operations to retrieve a list of all operations currently defined on the site.
The following code example checks whether the Anonymous user has LOGIN and READ access to pages with ID 29 and 31:
Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
XDoc pagesDoc = new XDoc("pages")
.Start("page")
.Attr("id", 29)
.End()
.Start("page")
.Attr("id", 31)
.End();
p.At("users", "=Anonymous", "allowed").With("operations", "LOGIN,READ").Post(pagesDoc); Sample response that indicates the Anonymous user has LOGIN and READ access to the page with ID 29, but not to the page with ID 31:
<pages>
<page id="29" href="http://deki-hayes/@api/deki/pages/29">
<title>DekiWiki (Hayes)</title>
<path />
</page>
</pages>