FELIX-3229 Fix permission checks (and clean code up a bit) for getConfiguration(String, String) and createFactoryConfiguration(String, String)