Fix history actions permissions check