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
e114f20328
Fix links in me request
2017-11-03 09:39:21 -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
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
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
72422803c4
Add superAdmin to users CRUD
2017-11-01 09:12:19 -04: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
d7b981987c
Remove RawUsers from DataStore
2017-10-31 17:49:35 -04:00
Michael Desa
5f63e2738a
Refactor data stores into a common interface
2017-10-31 16:41:17 -04:00
Jared Scheib
e0a535e78a
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
511c3e1957
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
a956bacc41
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
5c53fbbcc4
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
5bed2cfc4f
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
bf6c77ee5f
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
9a6ab1bf9d
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
c994e8c5ac
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
4687ecf794
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
f0f5bc071b
Extract logic for getting user by name & provider
2017-10-18 12:34:23 -04:00
Michael de Sa
b86164e710
Modify /me to match User via UsersStore.All & principal's Issuer
...
Signed-off-by: Jared Scheib <jared.scheib@gmail.com>
2017-10-16 19:58:02 -05:00
Jared Scheib
d27be61b8b
Rename getEmail func & email var to getUsername & username
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-16 19:58:02 -05:00
Jared Scheib
40fac47b28
Rename vestigial receiver 'h' on Service to 's'
...
Signed-off-by: Michael de Sa <mjdesa@gmail.com>
2017-10-10 15:27:58 -07:00
Chris Goller
eb5b288e00
Fix PathEscape work for go 1.7
2017-04-07 15:32:35 -05:00
Chris Goller
44aa0526ed
Update user/role responses to return empty arrays
2017-03-10 13:24:48 -06:00