nsmcp::Authorizer method require (public)

 <instance of nsmcp::Authorizer[i]> require context permission

Defined in /usr/local/ns/tcl/nsmcp/security.tcl

Require a permission for the current request context. Reuse allowed and raise the standard RPC authorization error when access is denied.

Parameters:
context (required)
Authenticated request context carrying the principal, grants and selected server.
permission (required)
Permission name required by the requested operation.
Returns:
An empty result on success; an RPC error on denial.

Testcases:
No testcase defined.
Source code:
if {![:allowed $context $permission]} {
    return -code error -errorcode {NSMCP RPC -32602} "Operation not permitted"
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: