UNPKG

@iflow-mcp/claudeus-wp-mcp

Version:

The most comprehensive WordPress MCP server - 145 production-ready tools for complete WordPress management with AI

50 lines 1.59 kB
export class UserConsentManager { consentStore = new Map(); auditLog = []; async requestConsent(operation, context) { // TODO: Implement consent request logic const granted = await this.promptUserConsent(operation, context); if (granted) { this.recordConsent(operation.type); } this.logConsentRequest(operation, granted, context); return granted; } async promptUserConsent(_operation, _context) { // TODO: Implement user prompt logic return true; } recordConsent(type) { const userConsents = this.consentStore.get('user') || new Set(); userConsents.add(type); this.consentStore.set('user', userConsents); } logConsentRequest(operation, granted, context) { this.auditLog.push({ timestamp: new Date().toISOString(), type: 'consent', operation: operation.type, status: granted ? 'success' : 'failure', details: {}, context }); } hasConsent(type) { const userConsents = this.consentStore.get('user'); return userConsents?.has(type) || false; } getAuditLog() { return this.auditLog; } logConsent(operation, success, context) { this.auditLog.push({ timestamp: new Date().toISOString(), type: 'consent', operation, status: success ? 'success' : 'failure', details: {}, context }); } } //# sourceMappingURL=UserConsentManager.js.map