Commit Graph

10 Commits (3e3284ba9809efe5078c37e6bbeaf55f649cd95c)

Author SHA1 Message Date
Michael Desa c7e3ebdc41 Only promote user to super admin in user org store
Add diff check to Organization UsersStore Add tests

Previously, a users super admin status was disregarded in the Add
facade. This was problematic when new users were added with a super
admin status, because they would not be granted the status. This created
an odd user experiece.
2017-12-14 10:56: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
Michael Desa ff9dd97026 Add Num to UsersStore interface 2017-11-30 12:55:59 -05:00
Michael Desa 816cb5b174 Prevent unintended update of existing user on Add
Previously, the organizations store did not check to see if the user
that a user was being "added" had a role in the organization, it simply
filtered out a users roles that did not belong to that organization and
blindly appended the new ones that were supplied.

This resulted in users being able to change another users role during
new Add request for the same user.
2017-11-29 17:58:42 -05:00
Michael Desa 6bc9ac285b Fix Update method in organization.UsersStore
Previously, when users were updated, we did not use the fields on the
user that was being persisted. As a result, the API responded with the
attribute being set, but the updated values were not actually stored in
bolt. This was not noticed previously because SuperAdmins had raw access
to the UsersStore
2017-11-10 19:06:38 -05:00
Michael Desa e7a94c18d6 Add comments throughout codebase 2017-11-01 12:30:42 -04:00
Michael Desa 0e18f8778b User explicit type when setting context 2017-11-01 09:49:02 -04:00
Michael Desa 00b79a45eb Add org param to New Organizaiton methods 2017-10-31 17:40:58 -04:00
Michael Desa 7ae4481178 Refactor organizations tests to use mocks 2017-10-30 17:03:53 -04:00
Michael Desa bea2caaa7f Move organization resouces to their own package 2017-10-30 14:31:19 -04:00