Commit Graph

22 Commits (bda43293f6a63cf7c0b3c3dc99783280a36c14ee)

Author SHA1 Message Date
Michael Desa 64f670e819 Add correct implementation of mappings 2018-02-05 14:54:39 -05:00
Michael Desa c718847014 Wire up bolt db ConfigStore in Server 2017-12-13 10:46:08 -08:00
Michael de Sa 17460e397b Implement Config GET service method
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-12-12 17:06:57 -08:00
Jared Scheib 14e8e70484 Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-12-05 18:47:05 -08:00
Michael Desa c9471d4084 Remove /mappings in place of /layouts
Remove POST/PUT/DELETE methods to /layouts
2017-12-05 17:07:09 -05:00
Michael Desa 57b876ad36 Unscope sources by role
Previously, as a misunderstanding of
https://github.com/influxdata/chronograf/issues/1915 we allowed
sources to be scoped by role within an organization. This was incorrect.
We no longer user the roles implementation of a chronograf.SourcesStore
and just use the organizations store.

We've left the code around a roles SourcesStore in place, since it may
be useful to us in the future. It may be worth removing if it is
determined that this behavior is not desirable.
2017-11-29 17:32:41 -05:00
Michael Desa e2ac7f8bf0 Use raw organizations store is user is super admin 2017-11-10 15:33:28 -05:00
Michael Desa f228e2860d Expose some organization routes to admins
Cleanup tests appropriately

Prevent Admins from patching organizations
2017-11-10 12:48:10 -05:00
Michael Desa 590b1857d5 Change UserKey to UserContextKey
Fix name of arguments in tests
2017-11-10 11:18:06 -05:00
Michael Desa 94d9d5345e Prevent user from deleteing themselves 2017-11-10 11:09:16 -05:00
Michael Desa f25c22444c Put entire user on context 2017-11-10 11:09:16 -05:00
Michael Desa 35be59a71a Differentiate between SuperAdminContext and ServerContext
Previously, the server just hijacked the super admin context in order to
get raw access to the underlying data stores, this introduces a way to
specify the it is explicitly the server making the request and no longer
hijack the super admin context.

This also adds test coverage to ensure that the correct values are being
set on context in the AuthorizedUser method.
2017-11-10 11:09:16 -05:00
Michael Desa 9b194168a6 Move user roles and role names to roles package 2017-11-06 11:27:13 -05:00
Michael Desa 9ee3b431db Add roles implementation of sources store
Minimal test coverage of Update/Delete/Add methods was done since they
do not involve any filtering. The filtering for them should have
happened at the API level.
2017-11-06 11:24:13 -05:00
Michael Desa 986f86d99c Fix relevant go-vet/go-lint for server package 2017-11-01 16:43:31 -04:00
Michael Desa 65028027fd Add comments to DataStore interface and implemntn 2017-11-01 14:24:40 -04:00
Michael Desa a8a115ec50 Change function signature of hasSuperAdminContext 2017-11-01 10:39:09 -04:00
Michael Desa 0e18f8778b User explicit type when setting context 2017-11-01 09:49:02 -04:00
Michael Desa 2bd2c81bb7 Add noop implementation of each source type 2017-10-31 18:07:42 -04:00
Michael Desa cf64b2e506 Remove RawUsers from DataStore 2017-10-31 17:49:35 -04:00
Michael Desa 00b79a45eb Add org param to New Organizaiton methods 2017-10-31 17:40:58 -04:00
Michael Desa 36e14cb111 Refactor data stores into a common interface 2017-10-31 16:41:17 -04:00