Commit Graph

22 Commits (7e90245dba84647fd40404cfef28d339408010df)

Author SHA1 Message Date
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 de Sa fcd25ad580 Implement Config GET service method
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-12-12 17:06:57 -08:00
Jared Scheib bbe1330cbf Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-12-05 18:47:05 -08:00
Michael Desa fc0d525022 Remove /mappings in place of /layouts
Remove POST/PUT/DELETE methods to /layouts
2017-12-05 17:07:09 -05:00
Michael Desa 9ef1e57934 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 89ca72952c Use raw organizations store is user is super admin 2017-11-10 15:33:28 -05:00
Michael Desa 85bb71033c Expose some organization routes to admins
Cleanup tests appropriately

Prevent Admins from patching organizations
2017-11-10 12:48:10 -05:00
Michael Desa 1832ecb4f7 Change UserKey to UserContextKey
Fix name of arguments in tests
2017-11-10 11:18:06 -05:00
Michael Desa e83bfe87e5 Prevent user from deleteing themselves 2017-11-10 11:09:16 -05:00
Michael Desa 71851d142f Put entire user on context 2017-11-10 11:09:16 -05:00
Michael Desa 4e46b4b2c7 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 859d94ab15 Move user roles and role names to roles package 2017-11-06 11:27:13 -05:00
Michael Desa f71e6a4b55 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 c161dd3cc1 Fix relevant go-vet/go-lint for server package 2017-11-01 16:43:31 -04:00
Michael Desa 929f67c882 Add comments to DataStore interface and implemntn 2017-11-01 14:24:40 -04:00
Michael Desa 7af7d65802 Change function signature of hasSuperAdminContext 2017-11-01 10:39:09 -04:00
Michael Desa 3eaca382d3 User explicit type when setting context 2017-11-01 09:49:02 -04:00
Michael Desa e111038816 Add noop implementation of each source type 2017-10-31 18:07:42 -04:00
Michael Desa d7b981987c Remove RawUsers from DataStore 2017-10-31 17:49:35 -04:00
Michael Desa 978da16ecd Add org param to New Organizaiton methods 2017-10-31 17:40:58 -04:00
Michael Desa 5f63e2738a Refactor data stores into a common interface 2017-10-31 16:41:17 -04:00