Commit Graph

16 Commits (068c14cb6260c1724719a0b7a26dc7b8a4fc5dce)

Author SHA1 Message Date
Michael Desa f26d2f0f35 Change Organization ID to string from uint64 2017-12-19 10:13:43 -08:00
Michael Desa b60ea8600d Clarify comment in organization/users Add method 2017-12-14 11:46:51 -08:00
Michael Desa f86004cda3 Add comment clarifying UsersStore Add method 2017-12-14 11:36:26 -08:00
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
Michael Desa e8c19bfd73 Remove organization LayoutsStore 2017-12-05 17:14:21 -05:00
Michael Desa 87551af3ff Allow empty Organization on Layouts in Org store
Previously, canned dashboards were global to the application. When
organizations were introduced, we scoped layouts under a specific
organization. This was done without consideration to the `canned`
layouts which are more global than a specific organization and likely
apply an an application level. Since the layout did not have any
organization associated with it, it was filtered out of the list of
results that one would see for `GET /mappings`.

This commit allows users to retrieve layouts that are stored in the
canned store that do not have an organization associated when the user
requests `All` layouts for an organization.

Future work for this is outlined as a comment in the commit.
2017-12-05 12:29:57 -05: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 f228e2860d Expose some organization routes to admins
Cleanup tests appropriately

Prevent Admins from patching organizations
2017-11-10 12:48:10 -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