MT::App::CMS::cms_delete_permission_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.
  • $obj - a reference to the MT::Object being deleted.

Return Value

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

Example Handler

sub handler {
    my ($cb, $app, $obj) = @_;  
    if ($obj->id % 2 == 0) { return 0; }
    return 1;
}
This page was last updated on 2008-10-01, 17:03.

Leave a note

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.