Commit Graph

276 Commits (704807f683ebc895441e40fadc14b4819bfaff68)

Author SHA1 Message Date
Iris Scholten 20c2b4e7c4 update the config_test and server_test files to accept super admin status as false 2018-02-05 10:41:31 -08:00
Iris Scholten b29bcfc478 change the create new user as super admin default setting to false 2018-02-02 17:44:49 -08:00
Michael Desa be3b76629a Add mappings to organizations
Add links to organization response on me
2018-01-10 15:56:13 -05:00
Michael Desa e0c100ea4e Remove unused code related to excess prints 2017-12-19 13:24:05 -08:00
Michael Desa ca055fe410 Add filestore impl of kapacitor and source stores
Remove random `fmt.Println`'s
2017-12-19 13:14:00 -08:00
Michael Desa 95c01ae080 Change default org ID to default from Default
This is so that the URL can be case insensitive. (e.g.
/chronograf/v1/organizations/default instead of
/chronograf/v1/organizations/Default)
2017-12-19 10:26:36 -08:00
Michael Desa f26d2f0f35 Change Organization ID to string from uint64 2017-12-19 10:13:43 -08:00
Chris Goller a6ef15ee54 Add multiple dashboard stores to server 2017-12-19 10:07:07 -08:00
Luke Morris 4d449ba32b Backup/Migrate/Initialize moved into Open
Signed-off-by: Chris Goller <goller@gmail.com>
2017-12-18 12:06:17 -08:00
Luke Morris 8843699303 Repair broken tests 2017-12-17 14:25:18 -08:00
Luke Morris 17759192b2 Refactor; simplify function responsibilities 2017-12-17 14:11:27 -08:00
Luke Morris 9e62489f77 Repair broken tests 2017-12-16 14:35:04 -08:00
Luke Morris 901aa0bb02 Add/correct comments for new Build functions 2017-12-16 14:09:39 -08:00
Luke Morris 4faf9c5440 Clean up prior to PR 2017-12-16 13:54:55 -08:00
Luke Morris b9910c6e52 Output backups to backup/ directory 2017-12-16 13:32:21 -08:00
Luke Morris e9d3f1aa31 Don't backup bolt if it is new 2017-12-16 13:06:43 -08:00
Luke Morris 2196a20100 Create backup of database when moving versions 2017-12-16 12:27:24 -08:00
Luke Morris d201fa941a WIP 2017-12-16 01:01:14 -08:00
Jared Scheib 058f5fbc20 Rename superAdminFirstUserOnly to superAdminNewUsers & flip default logic accordingly
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-12-13 14:49:49 -08:00
Michael Desa 331fa6f897 Add bolt implementation of chronograf.ConfigStore 2017-12-13 10:38:01 -08:00
Jared Scheib 31f012ff8f Merge branch 'master' into multitenancy 2017-12-06 19:05:16 -08:00
Jared Scheib 14e8e70484 Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-12-05 18:47:05 -08:00
Jared Scheib ff1cde524b Merge branch 'multitenancy' into multitenancy_fix_layouts 2017-12-05 16:03:05 -08:00
Michael Desa 2ec8da815b Remove Organization field from layouts 2017-12-05 17:28:33 -05:00
Michael Desa e8c19bfd73 Remove organization LayoutsStore 2017-12-05 17:14:21 -05:00
Jared Scheib 9b87433ddf Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-12-05 13:37:46 -08:00
Jared Scheib c9e579acb2 Merge remote-tracking branch 'origin/master' into multitenancy 2017-12-05 11:43:23 -08:00
Jared Scheib adce9f159c Merge pull request #2435 from influxdata/multitenancy_prevent_bad_add_org_user
Prevent unintended update of existing user on Add; fix duplicate User & Org creation client UX
2017-12-04 14:15:27 -08:00
Jared Scheib 4cb40dee33 Change ErrOrganizationNameTaken to ErrOrganizationAlreadyExists for consistency 2017-11-30 20:12:00 -08:00
Jared Scheib 76b61a146e Merge branch 'multitenancy' into multitenancy_reset_current_org 2017-11-30 19:07:40 -08:00
Jared Scheib 7588dcbf63 Complete 9ef1e57 by removing Role concept from sources in server 2017-11-30 19:03:56 -08:00
Michael Desa ff9dd97026 Add Num to UsersStore interface 2017-11-30 12:55:59 -05:00
Chris Goller 3a07920d4c Merge branch 'master' into gauge-cell-type
Conflicts:
	bolt/internal/internal.pb.go
	bolt/internal/internal.proto
	server/cells.go
2017-11-27 16:08:42 -06:00
Chris Goller d74de4e6f6 Update indentation format of the proto file 2017-11-21 19:29:34 -06:00
Chris Goller 312fce1bc5 Add colors to storage of cells 2017-11-21 19:26:25 -06:00
Andrew Watkins afa926a5c7 Update proto TimeShift property descriptions 2017-11-21 10:33:21 -08:00
Andrew Watkins bd025c2be2 Update test 2017-11-17 10:51:50 -08:00
Michael Desa 0ba2b40abe Set default role to viewer on source if not specified 2017-11-13 20:41:54 -08:00
Michael Desa 3af66d98ab Migrate all orphaned resources to DefaultOrg
When users upgrade, all of their bolt resources will not belong to any
organization. This PR introduces a migration path where any orphaned,
resources without an organization, will become owned by the default
organization.
2017-11-13 20:41:54 -08:00
Luke Morris 338916a340 Address PR feedback. 2017-11-13 18:08:50 -08:00
Luke Morris 0424f9f92e Make Public values explicit 2017-11-13 12:15:53 -08:00
Luke Morris 29815774f0 If not set, Public should be true by default 2017-11-13 11:58:07 -08:00
Luke Morris 1aebbf2bd4 Clear test noise 2017-11-10 18:45:25 -08:00
Luke Morris 6d2c7e18d1 Rename whitelistOnly => public 2017-11-10 18:23:41 -08:00
Michael Desa 6493902265 Check WhitelistOnly setting on default org in Me
Set DefaultOrganizationWhitelistOnly to false

Set DefaultOrganizationRole on new user in Me
2017-11-10 16:15:29 -05:00
Michael Desa b110a28278 Add WhitelistOnly to organizations
Fix adding default role to organization
2017-11-10 15:57:48 -05:00
Michael Desa cc6f703f5d Fix updating default role on organization 2017-11-10 14:55:21 -05:00
Andrew Watkins e98e1896ae WIP Add shifts to queryConifg on backend 2017-11-10 11:06:48 -08:00
Michael Desa 9920f5e90e Ensure users name, provider, and scheme are unique 2017-11-10 12:29:17 -05:00
Chris Goller d41a89debf Refactor and simplify auto group by (:interval:) template variable 2017-11-09 10:02:24 -08:00
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 8ded387a81 Add Role to chronograf.Source 2017-11-06 11:24:10 -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 63f7d8205c Add default role to chronograf.Organization 2017-11-06 09:46:00 -05:00
Michael Desa bf22d1d57d Ensure uniqueness of organization names in bolt 2017-11-02 13:04:41 -04:00
Michael Desa b61fad00b0 Add dependent destroy of resources for organization 2017-11-01 17:12:31 -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
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 37dc13d2c5 Fix organizations for default organization 2017-11-01 09:17:34 -04:00
Michael Desa 708c37dc67 WIP cleanup 2017-10-31 20:58:40 -04:00
Michael Desa e7e17537a1 WIP make app usable by frontend 2017-10-31 19:50:03 -04:00
Michael Desa f863bf2042 Add support for super admin 2017-10-31 18:27:24 -04:00
Michael Desa bea2caaa7f Move organization resouces to their own package 2017-10-30 14:31:19 -04:00
Michael Desa d6a0ab3488 Change OrganizationID to Organization in Roles
Fix formatting of proto file
2017-10-30 12:28:57 -04:00
Michael Desa 838d326022 Fix typo and organization dashboards test 2017-10-30 11:08:39 -04:00
Michael Desa 8fbe2ccd44 Fix incorrectly named file 2017-10-30 11:06:37 -04:00
Michael Desa d000a3e238 Add OrganizationLayoutsStore 2017-10-30 11:05:20 -04:00
Michael Desa 8b3f1abaac Add OrganizationServersStore 2017-10-30 10:57:41 -04:00
Michael Desa ef40315104 Add OrganizationsSourcesStore 2017-10-30 10:49:54 -04:00
Michael Desa 8288f97dd6 Add DashboardOrganization tests 2017-10-30 10:34:18 -04:00
Michael de Sa 2b7cdbfe07 WIP filter all resources by organization
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-27 18:14:46 -04:00
Michael de Sa 0f916d3240 Lowercase all Providers, Schemes, & Roles in OrganizationUsers tests
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-26 15:27:44 -07:00
Jared Scheib d6d3463208 Merge remote-tracking branch 'origin/multitenancy' into multitenancy_orgs
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-26 18:21:30 -04:00
Michael de Sa 8b8add9efc Make gen for proto changes in 68e08b987
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-25 11:58:55 -07:00
Jared Scheib cf530eddc6 Update Organization comments on resources
Remove `omitempty` on Organization field

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-25 14:56:08 -04:00
Michael de Sa e56299e72f Remove Organization from bolt Stores
Previously, each store depended on having an organization set on the
implentation of a store. This was used to segment different
organizations into different buckets. This PR undoes that work.

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-25 14:29:14 -04:00
Michael Desa e909ce9a1e Add Organizations to Dashboards 2017-10-25 14:00:06 -04:00
Michael Desa 57468b5fbe Add Organization to layouts 2017-10-25 12:52:56 -04:00
Michael Desa 71decb761e Add Organization to chronograf.Server 2017-10-25 12:42:50 -04:00
Michael Desa ef079a1899 Add Organization to Sources 2017-10-25 11:51:15 -04:00
Michael Desa 2a7f853580 REMOVE ME
This commit should be removed and was added so that it when I run make
gen for adding other values it won't polute the other commits
2017-10-25 11:49:56 -04:00
Jared Scheib f283702fe0 Lowercase Provider & Scheme & Role values for consistency
The client was being sent lowercase values for Role & Provider,
but not Scheme. This change makes all the above lowercase.
2017-10-24 16:17:59 -07:00
Jared Scheib 3b2818688a Make all Store names plural for consistency 2017-10-24 15:54:24 -07:00
Jared Scheib 54dff5cc4d Clean up plurals in func comments
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 15:09:37 -07:00
Michael de Sa 04dae2629a Test validOrganizationRoles comprehensively
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 15:08:01 -07:00
Michael de Sa edf66aab81 Add comments to validOrganization
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 15:07:35 -07:00
Jared Scheib 4691234719 Ensure additional Users aren't created OrganizationUser.Add
Performs a Get against the global UsersStore, and if the User
already exists, it appends to that User instead of trying to add
the "new" User blindly.

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:53:50 -07:00
Jared Scheib 66eb1f824e Rename userHasValidRoles to validOrganizationRoles for clarity
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:04:48 -07:00
Jared Scheib fac9d03b09 Clarify Update methodology comment
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 14:04:05 -07:00
Michael de Sa 5fc62210b7 Test for error on Add Org User without context Org
Refactor guards in OrganizationUser bolt methods into comon func

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:53:30 -07:00
Jared Scheib dbc08392e2 Improve test reporting for which user was deleted
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 13:45:09 -07:00
Michael de Sa e1bdf22eba Clean up derletion test name
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:43:25 -07:00
Michael de Sa 4d72ba6e4d Make vars consistent
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:41:47 -07:00
Jared Scheib 18054c6645 Improve get no users test
Change rawWant to wantRaw
Remove fmt.Println

Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-24 13:33:17 -07:00
Michael Desa 0aa28d7066 Add OrganizationUsersStore
bolt/organization_users_store contains a boltdb implementation of a
chronograf.UsersStore that filters the results based on the organization
that is set on the context.

Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 13:29:46 -04:00
Michael de Sa f873736c7c Remove printing from Organization tests
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-23 12:08:49 -07:00