public static function canEditAnnotation($hook, $type, $permission, $params) {

		$annotation = elgg_extract('annotation', $params);
		$user = elgg_extract('user', $params);

		if ($annotation instanceof ElggAnnotation && $annotation->name == 'likes') {
			// only owners of original annotation (or users who can edit these owners)
			$ann_owner = $annotation->getOwnerEntity();
			return ($ann_owner && $ann_owner->canEdit($user->guid));
		}

		return $permission;
	}