make gallery admin optional by adding 'gallery' config option which can be set to true or false