/**
* Method to check if you can edit an existing record.
*
* Extended classes can override this if necessary.
*
* @param array $data An array of input data.
* @param string $key The name of the key for the primary key; default is id.
*
* @return boolean
*
* @since 4.0.0
*/
protected function allowEdit($data = array(), $key = 'id')
{
return $this->app->getIdentity()->authorise('core.edit', $this->option);
}