Check out v4 of the Fauna CLI
v4 of the Fauna CLI is now in beta. The new version introduces enhancements to the developer experience, including an improved authentication workflow. To get started, check out the CLI v4 quick start. |
Query.isEnvProtected()
Test if the current database is protected.
Return value
Type | Description |
---|---|
Protected status: |
Examples
Call isEnvProtected()
with built-in Admin
role, on an unprotected database:
Query.isEnvProtected()
false
Calling isEnvProtected()
with built-in Server
role fails:
Query.isEnvProtected()
permission_denied: Insufficient privileges to perform the action.
error: Insufficient privileges to perform the action.
at *query*:1:21
|
1 | Query.isEnvProtected()
| ^^
|
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!