# checkAccess method

void checkAccess(

1. String operation,
2. DomainPermission permission

)

Verifies access permissions before performing sensitive operations.

Parameters:

- `operation`: Description of the operation being performed
- `permission`: Required permission level

Throws:

- `AccessDeniedError` if permissions are insufficient

Example:

    try {
      metadata.checkAccess('privateFieldAccess', DomainPermission.high);
      // Perform sensitive operation
    } on AccessDeniedError {
      print('Insufficient permissions');
    }

## Implementation

    void checkAccess(String operation, DomainPermission permission) {
      getProtectionDomain().checkAccess(operation, permission);
    }