code: public function checkPermission()
  	{
  		if ($this->User->isAdmin)
  		{
  			return;
  		}
  
  		// Show only own undo steps
  		$objSteps = $this->Database->prepare("SELECT id FROM tl_undo WHERE pid=?")
  								   ->execute($this->User->id);
  
  		// Restrict the list
  		$GLOBALS['TL_DCA']['tl_undo']['list']['sorting']['root'] = $objSteps->numRows ? $objSteps->fetchEach('id') : array(0);
  
  		// Redirect if there is an error
  		if (Contao\Input::get('act') && !\in_array(Contao\Input::get('id'), $GLOBALS['TL_DCA']['tl_undo']['list']['sorting']['root']))
  		{
  			throw new Contao\CoreBundle\Exception\AccessDeniedException('Not enough permissions to ' . Contao\Input::get('act') . ' undo step ID ' . Contao\Input::get('id') . '.');
  		}
  	}
docs: Check permissions to use table tl_undo
  
  @throws Contao\CoreBundle\Exception\AccessDeniedException