Added ErrOrganizationConfigNotFound error
Refactored FindOrCreate to use helper get method
Ensure that FindOrCreate creates a new org config if config not found
and returns any other errors
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
As previously implemented, OrganizationConfig was a global
object. This refactor adds the organization id to context for
every request, even when auth is disabled, so that org id
can be used to get/update an organization config.
Along those lines, this also removes OrganizationConfigStore
.Initialize and replaces .Get with .FindOrCreate, handling
the creation of organization configs upon first attempted
access.
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>