Commit Graph

8 Commits (ca9f0746ba3612c6dd7399bcb082cff8e40f7d2b)

Author SHA1 Message Date
Alirie Gray dfdd2907f0 Add log viewer link to organization config response
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-10 16:05:11 -07:00
Alirie Gray 6ec5d171e4 Rename org config method Update to Put for semantic accuracy
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-10 15:42:44 -07:00
Alirie Gray 913e21c136 Rename LogViewerOrganizationConfig to OrganizationLogViewerConfig
Co-authored-by: Jared Scheib <jared.scheib@gmail.com>
2018-07-10 12:05:29 -07:00
Alirie Gray 5b58c6aa59 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 9a60875048 Add tests for validLogViewerConfig & remove obsolete comments 2018-07-09 17:37:30 -07:00
Jared Scheib c79fa83064 Fix server/org_config_test function names in test error output 2018-07-09 17:37:30 -07:00
Jared Scheib 429fe214e6 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 9909bed41f 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