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
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
3ad2305c33
Add superAdmin to users CRUD
2017-11-01 09:12:19 -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
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
Michael Desa
bea2caaa7f
Move organization resouces to their own package
2017-10-30 14:31:19 -04:00
Michael Desa
1082b264fe
Use organization stores
2017-10-30 12:05:59 -04:00
Jared Scheib
cbc22b10d7
Test authorized User in the context of Organization
...
Make principal explicit arg in auth tests.
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-27 13:54:28 -07:00
Michael de Sa
cf58974927
Add organization field to principal in auth tests
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-27 13:19:43 -07:00
Jared Scheib
32a65aa307
Slightly DRYer code for getting fields off Principal
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-27 12:48:51 -07:00
Michael de Sa
cff3ae798d
Test MeOrganization for valid org with invalid user, and invalid org
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-27 10:14:14 -07:00
Jared Scheib
4c968b0ff5
Validate Organization and that User belongs to Org in MeOrganization
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-27 10:02:02 -07:00
Michael de Sa
5c4407cbaf
Test MeOrganization for setting and changing current org
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-26 16:03:01 -07:00
Michael de Sa
6dd9f52c47
Change organization in meOrganizationRequest to currentOrganization
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-26 16:02:29 -07:00
Jared Scheib
30d1739e35
Move Mock Authenticator into mocks package
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-26 15:46:06 -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 Desa
5e08464ecf
Provide route to change current users organization
...
Add current Organization to JWT.
Use OrganizationUsersStore to retrieve Users that are not me.
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-26 18:06:52 -04: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
Jared Scheib
4786964b54
Add Organization guard to server/kapacitors
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-25 14:48:19 -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
ef079a1899
Add Organization to Sources
2017-10-25 11:51:15 -04:00
Jared Scheib
bb67361cf1
Merge branch 'multitenancy' into multitenancy_lowercase_fields
2017-10-24 18:01:32 -07:00
Jared Scheib
aa8742662f
Merge branch 'master' into multitenancy
2017-10-24 17:58:15 -07:00
Jared Scheib
74fdcc1c39
Add scheme to me/AuthorizedUser tests
2017-10-24 16:21:24 -07: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
Michael de Sa
86ba743f40
Fix string interpolation data type for uint64 in Users tests
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 14:28:39 -07:00
Michael de Sa
2137191d5f
Modify ValidUpdate to ensure only User Roles can be updated
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-24 14:28:35 -07:00
Nathan Haugo
da560018c6
Update changelog and version number for 1.3.10.0
2017-10-24 09:34:31 -04:00
Michael Desa
2226f34cf2
Add tests for server/organizations.go
2017-10-23 14:16:52 -04:00
Michael Desa
3f3e7a5662
Fix typo in organization comment
2017-10-23 14:16:31 -04:00
Michael Desa
ee255f319d
Add missing returns in http hanlder methods
2017-10-20 15:42:51 -04:00
Michael Desa
b5e73dfd46
Add CRUD routes for organizations
2017-10-20 15:42:34 -04:00
Michael de Sa
414ca7f0b6
Add clarifying comment for InfluxDB UID being Name
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-19 14:42:34 -05:00
Michael de Sa
f463642bae
Update route authorization by Role
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-19 14:33:08 -05:00
Jared Scheib
19369b38cc
Set Scheme to be OAuth2 explicitly for all users
...
Add Provider to Users authenticated via /me
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-19 14:32:33 -05:00
Michael Desa
dafab1653a
Fix formating of server/auth.go
2017-10-19 12:54:06 -04:00
Michael Desa
8d472646cd
Fix wrong authorization level on selected routes
...
Fix leaking of username on failed authorization
Add comment to chronograf.UserQuery
Fix logic in hasPrivilege method
2017-10-18 15:45:06 -04:00
Michael Desa
a0d300d280
Use new chonograf.UserStore Get method when needed
...
Refactor tests that were dependent of old implementation of UsersStore
2017-10-18 14:45:33 -04:00
Michael Desa
246e65e598
Generalize chronograf.UsersStore Get method
...
The `Get` method on the UsersStore was generalize by changing the second
parameter to a struct. This allows the Store to retrieve users by more
than simply their name.
-Get(ctx context.Context, name string) (*User, error)
+Get(ctx context.Context, q UserQuery) (*User, error)
2017-10-18 14:17:42 -04:00