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

Function ValidateIAMBinding

backend/utils/member.go:17–24  ·  view source on GitHub ↗

ValidateIAMBinding checks if the binding's condition expression is still valid (e.g., not expired).

(binding *storepb.Binding)

Source from the content-addressed store, hash-verified

15
16// ValidateIAMBinding checks if the binding's condition expression is still valid (e.g., not expired).
17func ValidateIAMBinding(binding *storepb.Binding) bool {
18 ok, err := common.EvalBindingCondition(binding.Condition.GetExpression(), time.Now())
19 if err != nil {
20 slog.Error("failed to eval binding condition", slog.String("expression", binding.Condition.GetExpression()), log.BBError(err))
21 return false
22 }
23 return ok
24}
25
26func FormatGroupName(group *store.GroupMessage) string {
27 if group.Email != "" {

Callers 3

checkFunction · 0.92
GetUserIAMPolicyBindingsFunction · 0.85

Calls 5

EvalBindingConditionFunction · 0.92
BBErrorFunction · 0.92
StringMethod · 0.65
GetExpressionMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected