Michael Desa
d40a374274
Add comments suggested from PR review
...
Add tests to server/stores_test.go
2017-11-07 13:59:40 -05:00
Michael Desa
bd4d5c6cc3
Fix role related tests after rebase
2017-11-06 11:31:44 -05:00
Michael Desa
9b194168a6
Move user roles and role names to roles package
2017-11-06 11:27:13 -05:00
Michael Desa
4781cb3673
Allow update of sources.Role in server.UpdateSource
2017-11-06 11:25:51 -05:00
Michael Desa
f3f183f685
Add role ctx where appropriate in AuthorizedUser
2017-11-06 11:25:46 -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
8ded387a81
Add Role to chronograf.Source
2017-11-06 11:24:10 -05:00
Michael Desa
aa45f265cc
Merge pull request #2243 from influxdata/multitenancy_demote_superadmin
...
Allow SuperAdmins to promoted and demoted
2017-11-06 11:22:38 -05:00
Michael Desa
f0d19277a3
Pull out setting super admin into a single func
2017-11-06 11:15:49 -05:00
Michael Desa
3565eda4a1
Allow SuperAdmins to promoted and demoted
2017-11-06 11:15:48 -05:00
Michael Desa
4de8ef7441
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
49232f009e
Add default org check even when no auth is used
2017-11-06 10:17:17 -05:00
Michael Desa
f75de68607
Remove DefaultOrganization Name in tests mock store
2017-11-06 10:17:17 -05:00
Michael Desa
1c48601792
Add test for deleting default organization
...
Group together constants
2017-11-06 10:17:15 -05:00
Michael Desa
999f6c6a24
Change default organization name to Default
2017-11-06 10:15:50 -05:00
Michael Desa
28211fabec
Prevent deletion of default organization
2017-11-06 10:14:14 -05:00
Michael Desa
7200aaf9f9
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
81318f6584
Merge pull request #2220 from influxdata/multitenancy_default_org_role
...
Add default role organization
2017-11-06 10:10:29 -05:00
Michael Desa
292143f01b
Add comment to default role in chronograf.go
2017-11-06 09:46:00 -05:00
Michael Desa
09f79f3a3e
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
63f7d8205c
Add default role to chronograf.Organization
2017-11-06 09:46:00 -05:00
Michael Desa
1012c92a59
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
167c0c06a8
Prevent duplicate organization roles in user CRUD
2017-11-03 12:06:18 -04:00
Michael Desa
aabefe3ac1
Fix me tests with proper IDs
2017-11-03 09:47:54 -04:00
Michael Desa
4baa65629a
Fix links in me request
2017-11-03 09:39:21 -04:00
Michael Desa
450a965019
Properly pass organization context to handlers
2017-11-03 09:13:03 -04:00
Michael Desa
b67b2e8d6e
Fix over-stringification of organization on roles
2017-11-02 21:52:30 -04:00
Jared Scheib
500843a867
Add SuperAdmin to userResponse
2017-11-02 16:24:16 -07:00
Michael Desa
f95a2963db
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
d0271fecce
Merge pull request #2216 from influxdata/multitenancy_unique_org_names
...
Ensure unique organization names.
2017-11-02 13:41:36 -04:00
Michael Desa
bf22d1d57d
Ensure uniqueness of organization names in bolt
2017-11-02 13:04:41 -04:00
Michael Desa
311c68f457
Add CurrentOrganization & Organizations to me resp
...
Remove CurrentOrganization from chronograf.User
2017-11-02 11:59:53 -04:00
Michael Desa
92466975a2
Merge pull request #2142 from influxdata/multitenancy_orgs
...
Implement Organizations
2017-11-02 10:32:26 -04:00
Michael Desa
b61fad00b0
Add dependent destroy of resources for organization
2017-11-01 17:12:31 -04:00
Michael Desa
986f86d99c
Fix relevant go-vet/go-lint for server package
2017-11-01 16:43:31 -04:00
Michael Desa
aa2087ec43
Add exhaustive test for AuthorizedUser
2017-11-01 16:38:17 -04:00
Michael Desa
94179f8f34
Add comment of how to generate JWT tokens
2017-11-01 16:05:56 -04:00
Michael Desa
65028027fd
Add comments to DataStore interface and implemntn
2017-11-01 14:24:40 -04:00
Michael Desa
eb845b1630
Fix routes tests
2017-11-01 14:09:58 -04:00
Jared Scheib
63e88e4853
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
2e0911dbd9
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
40feb4ae94
Change nil check to len == 0 check for userRequest
2017-11-01 12:38:26 -04:00
Michael Desa
46987558e0
Remove unused code
2017-11-01 12:35:09 -04:00
Michael Desa
569978b4f7
Add parseOrganizationID method
2017-11-01 12:34:00 -04:00
Michael Desa
e7a94c18d6
Add comments throughout codebase
2017-11-01 12:30:42 -04:00
Michael Desa
a3be77a4ba
Fix Migrate Organizations to not overwrite name
2017-11-01 10:55:32 -04:00
Michael Desa
a8a115ec50
Change function signature of hasSuperAdminContext
2017-11-01 10:39:09 -04:00
Michael Desa
4c0469cb07
Change OrganizationID to Organization in Me req
2017-11-01 10:37:32 -04:00
Michael Desa
0e18f8778b
User explicit type when setting context
2017-11-01 09:49:02 -04:00
Michael Desa
3bfed5756d
Remove setting default org on Principal
2017-11-01 09:21:35 -04:00