# checkAccess abstract method

void checkAccess(

1. String operation, [
2. DomainPermission? permission

])

Performs an access check for a specific `operation`, optionally guarded by a required `permission`. Throws if the access is not allowed.

### Example:

    domain.checkAccess('setField', DomainPermission.WRITE_FIELDS);

## Implementation

    void checkAccess(String operation, [DomainPermission? permission]);