Commit Graph

5707 Commits (84517239b03590d982d66646be8917666eb3bfa2)

Author SHA1 Message Date
Michael Desa 84517239b0
Merge pull request #2219 from influxdata/multitenancy_default_org
Remove explicit default org ID use
2017-11-06 11:12:33 -05:00
Michael Desa c7e49001d4 Add default org check even when no auth is used 2017-11-06 10:17:17 -05:00
Michael Desa 66c779c193 Remove DefaultOrganization Name in tests mock store 2017-11-06 10:17:17 -05:00
Michael Desa 569ae2ce4b Add test for deleting default organization
Group together constants
2017-11-06 10:17:15 -05:00
Michael Desa f92fc37f17 Change default organization name to Default 2017-11-06 10:15:50 -05:00
Michael Desa 440f2ed2b5 Prevent deletion of default organization 2017-11-06 10:14:14 -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 7f7674d829
Merge pull request #2220 from influxdata/multitenancy_default_org_role
Add default role organization
2017-11-06 10:10:29 -05:00
Michael Desa a7ddb15c5c Add comment to default role in chronograf.go 2017-11-06 09:46:00 -05:00
Michael Desa 3ddd253d68 Grant user role in default org if added via API
When users are created via the API they are only given roles in orgs
that are explicitly set. Additionally the roles must be roles that
belong to the current organization (unless they are a super admin).

This leads to a situation where a user may not be a part of the default
organization. If this is the case, we detect it when the user hits /me
and add the user to the default org.
2017-11-06 09:46:00 -05:00
Michael Desa 45f1410fd6 Add default role to chronograf.Organization 2017-11-06 09:46:00 -05:00
Michael Desa 9d9de1f8d7
Merge pull request #2242 from influxdata/multitenancy_single_role_per_org
Prevent duplicate organization roles in user CRUD
2017-11-06 09:44:31 -05:00
Michael Desa 271aebb40f Prevent duplicate organization roles in user CRUD 2017-11-03 12:06:18 -04:00
Michael Desa 81e0bf06dc Fix me tests with proper IDs 2017-11-03 09:47:54 -04:00
Michael Desa e114f20328 Fix links in me request 2017-11-03 09:39:21 -04:00
Michael Desa 6539e5ebeb Properly pass organization context to handlers 2017-11-03 09:13:03 -04:00
Michael Desa 6f72d72fca Fix over-stringification of organization on roles 2017-11-02 21:52:30 -04:00
Jared Scheib fe6e0682ca Add SuperAdmin to userResponse 2017-11-02 16:24:16 -07:00
Michael Desa 14beabb6fd
Merge pull request #2215 from influxdata/multitenancy_add_orgs_to_me
Add CurrentOrganization & Organizations to me resp
2017-11-02 15:38:49 -04:00
Michael Desa 28fb7823be
Merge pull request #2216 from influxdata/multitenancy_unique_org_names
Ensure unique organization names.
2017-11-02 13:41:36 -04:00
Michael Desa ac3a175c75 Ensure uniqueness of organization names in bolt 2017-11-02 13:04:41 -04:00
Michael Desa da1fa2141b Add CurrentOrganization & Organizations to me resp
Remove CurrentOrganization from chronograf.User
2017-11-02 11:59:53 -04:00
Michael Desa 9b9db9282c
Merge pull request #2142 from influxdata/multitenancy_orgs
Implement Organizations
2017-11-02 10:32:26 -04:00
Michael Desa 78754bdbda Add dependent destroy of resources for organization 2017-11-01 17:12:31 -04:00
Michael Desa c161dd3cc1 Fix relevant go-vet/go-lint for server package 2017-11-01 16:43:31 -04:00
Michael Desa 2aadaf3ff6 Add exhaustive test for AuthorizedUser 2017-11-01 16:38:17 -04:00
Michael Desa 06fa9d0e2a Add comment of how to generate JWT tokens 2017-11-01 16:05:56 -04:00
Michael Desa 929f67c882 Add comments to DataStore interface and implemntn 2017-11-01 14:24:40 -04:00
Michael Desa fd66c8a227 Fix routes tests 2017-11-01 14:09:58 -04:00
Jared Scheib 79b3f173fb Change version on UsersBucket to V2 for clean upgrade path
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-11-01 10:57:49 -07:00
Jared Scheib cd719805ed Add organizations and users routes to allRoutes
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-11-01 12:59:07 -04:00
Michael Desa 3f55da7503 Change nil check to len == 0 check for userRequest 2017-11-01 12:38:26 -04:00
Michael Desa 4ecf215d19 Remove unused code 2017-11-01 12:35:09 -04:00
Michael Desa dc63e8af8f Add parseOrganizationID method 2017-11-01 12:34:00 -04:00
Michael Desa 6fbfde5060 Add comments throughout codebase 2017-11-01 12:30:42 -04:00
Michael Desa 39d3488749 Fix Migrate Organizations to not overwrite name 2017-11-01 10:55:32 -04:00
Michael Desa 7af7d65802 Change function signature of hasSuperAdminContext 2017-11-01 10:39:09 -04:00
Michael Desa 24c99a761b Change OrganizationID to Organization in Me req 2017-11-01 10:37:32 -04:00
Michael Desa 3eaca382d3 User explicit type when setting context 2017-11-01 09:49:02 -04:00
Michael Desa dd7dac6a5f Remove setting default org on Principal 2017-11-01 09:21:35 -04:00
Michael Desa ccbaac2b6d Fix organizations for default organization 2017-11-01 09:17:34 -04:00
Michael Desa 72422803c4 Add superAdmin to users CRUD 2017-11-01 09:12:19 -04:00
Alex Paxton 10e55376f5
Merge pull request #2174 from influxdata/multitenancy_ui_role_authorization
Implement Role-based authorization UI for Viewer and Editor roles
2017-10-31 20:03:01 -07:00
Michael Desa a9d5bf9c05 WIP cleanup 2017-10-31 20:58:40 -04:00
Michael Desa d1488a973b WIP make app usable by frontend 2017-10-31 19:50:03 -04:00
Michael Desa 391bd189c1 Add support for super admin 2017-10-31 18:27:24 -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