gobj_user_has_authz()#
Checks if a user has the specified authorization level in the context of the given hgobj. If no authorization checker is defined, the function defaults to granting authorization.
Prototype
BOOL gobj_user_has_authz(
hgobj gobj,
const char *authz,
json_t *kw,
hgobj src
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
The |
|
|
The name of the authorization level to check. |
|
|
A JSON object containing additional parameters for the authorization check. |
|
|
The source |
Return Value
Returns TRUE if the user has the required authorization, otherwise returns FALSE.
Notes
If the hgobj has a local authorization checker (mt_authz_checker), it is used first. If not, the global authorization checker is used. If neither is defined, the function defaults to returning TRUE.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples