UNPKG

@stolostron/multicluster-sdk

Version:

Provides extensions and APIs that dynamic plugins can use to leverage multicluster capabilities provided by Red Hat Advanced Cluster Management.

18 lines 1.13 kB
import { K8sVerb, SelfSubjectAccessReviewKind } from '@openshift-console/dynamic-plugin-sdk'; import _ from 'lodash'; /** * Memoizes the result so it is possible to only make the request once for each access review. * This does mean that the user will have to refresh the page to see updates. * Function takes in the destructured resource attributes so that the cache keys are stable. * `JSON.stringify` is not guaranteed to give the same result for equivalent objects. * Impersonate headers are added automatically by `k8sCreate`. * @param group resource group. * @param resource resource string. * @param subresource subresource string. * @param verb K8s verb. * @param namespace namespace. * @param impersonateKey parameter to include in the cache key even though it's not used in the function body. * @returns Memoized result of the access review. */ export declare const checkAccess: ((group: string, resource: string, subresource: string, verb: K8sVerb, name: string, namespace: string, cluster: string) => Promise<SelfSubjectAccessReviewKind>) & _.MemoizedFunction; //# sourceMappingURL=checkAccess.d.ts.map