objectManager: Show errors when checks prior to deletion fail
This commit is contained in:
committed by
Chris Morgan
parent
3edd18c101
commit
070df9daca
@@ -521,10 +521,16 @@ class ObjectManager
|
|||||||
$oObject = $this->getObject();
|
$oObject = $this->getObject();
|
||||||
|
|
||||||
if(!$oObject->objectGetId())
|
if(!$oObject->objectGetId())
|
||||||
|
{
|
||||||
|
addmsg("No id defined", "red");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if(!$oObject->canEdit())
|
if(!$oObject->canEdit())
|
||||||
|
{
|
||||||
|
addmsg("You don’t have permission to delete this entry", "red");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
$oSubmitterMail = $this->get_mail(TRUE, "delete");
|
$oSubmitterMail = $this->get_mail(TRUE, "delete");
|
||||||
$oCommonMail = $this->get_mail(FALSE, "delete");
|
$oCommonMail = $this->get_mail(FALSE, "delete");
|
||||||
|
|||||||
Reference in New Issue
Block a user