Home > @cerbos/core > Client > enablePolicies
Enable multiple policies.
Signature:
enablePolicies(request: EnablePoliciesRequest, options?: RequestOptions): Promise<EnablePoliciesResponse>;
Parameter |
Type |
Description |
---|---|---|
request | ||
options |
(Optional) |
Returns:
Promise<EnablePoliciesResponse>
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 result = await cerbos.enablePolicies({
ids: ["resource.document.v1", "resource.image.v1"],
});