MCPcopy Create free account
hub / github.com/bytebase/bytebase / isBindingPolicyExpired

Function isBindingPolicyExpired

frontend/src/utils/v1/iam.ts:34–45  ·  view source on GitHub ↗
(binding: Binding)

Source from the content-addressed store, hash-verified

32import { ensureUserFullName } from "@/utils/v1/user";
33
34export const isBindingPolicyExpired = (binding: Binding): boolean => {
35 if (binding.parsedExpr) {
36 const conditionExpr = convertFromExpr(binding.parsedExpr);
37 if (conditionExpr.expiredTime) {
38 const expiration = new Date(conditionExpr.expiredTime);
39 if (expiration < new Date()) {
40 return true;
41 }
42 }
43 }
44 return false;
45};
46
47// Revoke a single member from one specific role binding, returning a new policy
48// (the input is left untouched).

Callers 9

createIamSliceFunction · 0.90
useApprovalStepFunction · 0.90
useApprovalCandidatesFunction · 0.90
renderProjectRoleSummaryFunction · 0.90
MemberTableByRoleFunction · 0.90
EditMemberRoleDrawerFunction · 0.90
getUserListInBindingFunction · 0.85
filterBindingsByUserNameFunction · 0.85

Calls 1

convertFromExprFunction · 0.90

Tested by

no test coverage detected