public function deleteFaces()
{
global $injector, $registry;
$face_id = intval($this->vars->face_id);
$image_id = intval($this->vars->image_id);
$storage = $injector->getInstance('Ansel_Storage');
$image = $storage->getImage($image_id);
$gallery = $storage->getGallery($image->gallery);
if (!$gallery->hasPermission($registry->getAuth(), Horde_Perms::EDIT)) {
throw new Ansel_Exception('Access denied editing the photo.');
}
Ansel_Faces::delete($image, $face_id);
return true;
}