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();
|
||||
|
||||
if(!$oObject->objectGetId())
|
||||
{
|
||||
addmsg("No id defined", "red");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if(!$oObject->canEdit())
|
||||
{
|
||||
addmsg("You don’t have permission to delete this entry", "red");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$oSubmitterMail = $this->get_mail(TRUE, "delete");
|
||||
$oCommonMail = $this->get_mail(FALSE, "delete");
|
||||
|
||||
Reference in New Issue
Block a user