fix(security): close init config and parser-check redaction gaps
Strip model base URLs from viewer-accessible initialization config responses and merge redacted parser secrets before engine check overrides so admin test flows keep working after masked GET responses.
This commit is contained in:
@@ -16,7 +16,12 @@ func CanViewIntegrationSecrets(ctx context.Context) bool {
|
||||
return RoleFromContext(ctx).HasPermission(types.TenantRoleAdmin)
|
||||
}
|
||||
|
||||
// RoleCanViewTenantAPIKey is true for Owner+ only.
|
||||
func RoleCanViewTenantAPIKey(role types.TenantRole) bool {
|
||||
return role.HasPermission(types.TenantRoleOwner)
|
||||
}
|
||||
|
||||
// CanViewTenantAPIKey is true for Owner+ only.
|
||||
func CanViewTenantAPIKey(ctx context.Context) bool {
|
||||
return RoleFromContext(ctx).HasPermission(types.TenantRoleOwner)
|
||||
return RoleCanViewTenantAPIKey(RoleFromContext(ctx))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user