UpdatePolicy updates an existing policy (if supported by the store)
(ctx context.Context, name string, document policy_engine.PolicyDocument)
| 263 | |
| 264 | // UpdatePolicy updates an existing policy (if supported by the store) |
| 265 | func (cm *CredentialManager) UpdatePolicy(ctx context.Context, name string, document policy_engine.PolicyDocument) error { |
| 266 | // Check if the store implements PolicyManager interface with UpdatePolicy |
| 267 | if policyStore, ok := cm.Store.(PolicyManager); ok { |
| 268 | return policyStore.UpdatePolicy(ctx, name, document) |
| 269 | } |
| 270 | // Fallback to PutPolicy for stores that only implement CredentialStore |
| 271 | return cm.Store.PutPolicy(ctx, name, document) |
| 272 | } |
| 273 | |
| 274 | // PutUserInlinePolicy stores a per-user inline policy document. |
| 275 | // Returns nil without error if the underlying store does not support inline policies. |
nothing calls this directly
no test coverage detected