Changes

Jump to navigation Jump to search
72 bytes removed ,  18:35, 1 December 2023
m
Text replacement - "<syntaxhighlight lang="xquery">" to "<pre lang='xquery'>"
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
</html>
};
</syntaxhighlightpre>
The permission strings may denote ids, users, user groups, applications, or any other realms. It is completely up to the user which strings are used, and which functions will be annotated. In the given example code, only the last function has a {{Code|%perm:allow}} annotation.
An example:
<syntaxhighlight pre lang="'xquery"'>
import module namespace Session = 'http://basex.org/modules/session';
return web:redirect('/main')
};
</syntaxhighlightpre>
Some notes:
The following lines of code complete the image:
<syntaxhighlight pre lang="'xquery"'>
declare
%rest:path("/login-check")
web:redirect("/")
};
</syntaxhighlightpre>
For a full round trip, check out the source code of the [[DBA]] that is bundled with BaseX.
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu