Not a developer? Go to MovableType.com

Documentation

MT::App::CMS::cmssavepermission_filter.$type

This callback is invoked when a user is attempting to save an object of a designated type (as specified by $type) from within the Movable Type application. The intent of this callback is to give plugins the opportunity to revoke the current user’s permission to save the correlated object.

Input Parameters

  • $cb - a reference to the current MT::Callback object handling this event.
  • $app - a reference to the MT::App::CMS object processing the request.
  • $id - the ID of the object, if it already exists, or “undef” if it is a new object with this request.

Return Value

A boolean (true/false) value. Returning false will revoke the current user’s ability to save the corresponding object.

Example Handler

sub handler {
    my ($cb, $app, $id) = @_;
    if ($id % 2 == 0) { return 0; }
    return 1;
}
Back