Commit Graph

6 Commits (a309c3f0261505fa865a47b26f48b78fb4455229)

Author SHA1 Message Date
Alirie Gray f2a171d72b Add default colors to default organization config
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-10 12:19:37 -07:00
Alirie Gray 803c1dbbe3 Move nil config guard to helper update method
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-10 11:41:30 -07:00
Alirie Gray 251d15672b Guard against length-0 slice in org_config get and FindOrCreate methods
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>
2018-07-10 11:41:06 -07:00
Jared Scheib ef3741cdc8 Fix FindOrCreate persisting OrganizationConfig to bolt
Add get/update helper methods for OrganizationConfig in bolt.

Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-09 17:37:30 -07:00
Jared Scheib ae475c7ae8 Add OrganizationConfigStore & refactor org config to be per org
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>
2018-07-09 17:36:19 -07:00
Jared Scheib ecb5347597 WIP Refactor log viewer config to be nested under organizations
Co-authored-by: Alirie Gray <alirie.gray@gmail.com>
2018-07-09 17:36:19 -07:00