ProcessPageEditImageSelect::checkImageEditPermission()

Check if user has image edit permission and throw exception if they don't

RTE mode may create separate variations from viewable source images. Keeping variations with the source image ensures they are removed with it. Direct image edits require edit access.

Usage

// basic usage
$bool = $processPageEditImageSelect->checkImageEditPermission();

// usage with all arguments
$bool = $processPageEditImageSelect->checkImageEditPermission(bool $throw = true);

Arguments

NameType(s)Description
$throw (optional)bool

Specify false if you only want this method to return a true|false rather than throw exception

Return value

bool

if the $throw argument was false

Exceptions

Method can throw exceptions on error:

  • WirePermissionException


ProcessPageEditImageSelect methods and properties

API reference based on ProcessWire core version 3.0.275