ChangeApprovalPolicy
final class ChangeApprovalPolicy (View source)
Pure rules for the opt-in change approval workflow: whether a user's zone changes are written directly, filed as a change request, or refused, and who may review a request.
Constants
| MODE_DIRECT |
Changes are written to the zone immediately (today's behaviour). |
| MODE_REQUEST |
Changes are stored as a change request that a reviewer applies later. |
| MODE_NONE |
The user may neither change the zone nor request changes to it. |
Methods
How the user's changes to a zone are handled.
Reviewing needs both the approve level and the edit permission: the record writers re-check the reviewer's edit rights when a request is applied, so the approve permission adds to edit rights and never replaces them.
Details
static string
mode(bool $enabled, bool $requireReviewForAll, string $permEdit, string $permRequest, bool $userIsZoneOwner)
How the user's changes to a zone are handled.
static bool
canReview(string $permApprove, string $permEdit, bool $userIsZoneOwner)
Reviewing needs both the approve level and the edit permission: the record writers re-check the reviewer's edit rights when a request is applied, so the approve permission adds to edit rights and never replaces them.