With the {{Code|%perm:allow}} annotation, one or more permission strings can be attached to a RESTXQ function:
<syntaxhighlight pre lang="'xquery"'>
(:~ Login page (visible to everyone). :)
declare
An example:
<syntaxhighlight pre lang="'xquery"'>
import module namespace Session = 'http://basex.org/modules/session';
The following lines of code complete the image:
<syntaxhighlight pre lang="'xquery"'>
declare
%rest:path("/login-check")