Home > @cerbos/core > Client > enablePolicy
Enable a policy.
Signature:
enablePolicy(id: string, options?: RequestOptions): Promise<boolean>;
Parameter |
Type |
Description |
---|---|---|
id |
string | |
options |
(Optional) |
Returns:
Promise<boolean>
Requires
-
the client to be configured with Options.adminCredentials,
-
the Cerbos policy decision point server to be at least v0.26 and configured with the admin API enabled, and
-
a dynamic storage backend.
const enabled = await cerbos.enablePolicy("resource.document.v1");