ValidateIAMBinding checks if the binding's condition expression is still valid (e.g., not expired).
(binding *storepb.Binding)
| 15 | |
| 16 | // ValidateIAMBinding checks if the binding's condition expression is still valid (e.g., not expired). |
| 17 | func 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 | |
| 26 | func FormatGroupName(group *store.GroupMessage) string { |
| 27 | if group.Email != "" { |
no test coverage detected