Ripon's Old Deanery to reopen after licence granted