-
Notifications
You must be signed in to change notification settings - Fork 18
fix space user from automatically being populated upon invite #1194
Conversation
in prod, if you try to invite a user to the space by e-mail, they will not be populated in the user list automatically. you need to refresh to see them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this working again!
I just have a few additional comments:
-
on line 42 of@jcscottiii pointed out that this is called, rescinding.user_actions
we have a methodfetchSpaceUserRoles
. This isn't called anywhere in the application and should probably be removed. -
This PR adds some new methods to associate users to spaces, but what about the existing store code that handles the
SPACE_USER_ROLES_RECEIVED
action type? Do we need both ways to associate the user to the space? -
The comment on line 67 in
user_actions
doesn't apply anymore, since the method call it was commenting has been removed.
static_src/constants.js
Outdated
USER_ORG_ASSOCIATED: null, | ||
// Action to trigger email sent to user with cloud.gov invite url | ||
// and associate user to space. | ||
USER_SPACE_ASSOCIATE: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment is slightly misleading, since this action type doesn't trigger the email invite as a result of it being dispatched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right. i just copied the one above. will change both of them.
|
|
that one call gets both the users and their roles. https://apidocs.cloudfoundry.org/268/spaces/retrieving_the_roles_of_all_users_in_the_space.html |
Right, I understand that, I guess I was just saying that the function is not well named. The spaces API specifically doesn't let you get all the users (without their roles, like the orgs API), it only has a function to get the users and their roles within the space. This isn't necessarily calling out this code specifically, the method is called the same thing in the cloud foundry api and it seems confusing. |
Like you said, Orgs also exposes the same call to get users and their roles for orgs, so we should for sure use that going forward. |
re: #1194 (comment)
We need both. The associated action toggles |
@el-mapache i don't see a comment there?
|
@jcscottiii Whoops! I typed |
@jcscottiii So you are saying that we were previously overloading |
@el-mapache should be ready to go! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for walking me through the changes!
in prod, if you try to invite a user to the space by e-mail, they will
not be populated in the user list automatically. you need to refresh to
see them.