/**
* Sets the permission of this share.
*
* @param Horde_Perms_Permission $perm Permission object.
* @param boolean $update Should the share be saved
* after this operation?
*/
public function setPermission($perm, $update = true)
{
$this->data['perm'] = $perm->getData();
if ($update) {
$this->save();
}
}