Commit Graph

8 Commits (039b093d18bcfa080207c4388dc38b58d8df9e46)

Author SHA1 Message Date
Alirie Gray 0f810debcb 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 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 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
Michael Desa 8b60388d81 Add correct implementation of mappings 2018-02-05 14:54:39 -05:00
Michael Desa 9a1ba96977 Wire up bolt db ConfigStore in Server 2017-12-13 10:46:08 -08:00
Michael Desa e27936ee69 Add Num to UsersStore interface 2017-11-30 12:55:59 -05:00
Michael Desa 3370774e8f Add default org logic to OrganizationsStore
Update resource handlers to appropriate consume default organization IDs
2017-11-06 10:14:12 -05:00
Michael Desa e111038816 Add noop implementation of each source type 2017-10-31 18:07:42 -04:00