You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional context
How the flow of the store is working:
We have 2 main types of users, one that we call resellers and the other that we think of as consumers, both have organizations. However, every time an internal form is filled out, we create an organization for that reseller user, and associate him with his organization with the role “store-admin”. Then we take that reseller user's email and associate it with other consumer organizations as "customer-buyer”.
Where, yes, “organization-admin” is configured to be able to add new users.
In this, every time this reseller accesses my account, we create a custom component that simply takes information from this email user and takes organizationid and
costCenterId of your Admin reseller and we use it in mutation
setCurrentOrganization to make it active in that current organization.
Looking at the code, we think that it might be a problem that when we update the current organization it does not update the permissions, because when we look at the permissions, it continues with a permission that is not from the organization we set.
I don't know if it makes sense, but if in this request that is made to get the data, instead of using getUserByEmail by getActiveUserByEmail, you could get the correct information:
Describe the bug
when we change the current store organization with the mutation
setCurrentOrganization
we don't update the permissions.To Reproduce
Expected behavior
It should open the popup to add new users in the organization
Screenshots
https://imgur.com/gcpw96E
Additional context
How the flow of the store is working:
We have 2 main types of users, one that we call resellers and the other that we think of as consumers, both have organizations. However, every time an internal form is filled out, we create an organization for that reseller user, and associate him with his organization with the role “store-admin”. Then we take that reseller user's email and associate it with other consumer organizations as "customer-buyer”.
Where, yes, “organization-admin” is configured to be able to add new users.
https://prnt.sc/5yvdHfgDrCgZ
In this, every time this reseller accesses my account, we create a custom component that simply takes information from this email user and takes organizationid and
costCenterId of your Admin reseller and we use it in mutation
setCurrentOrganization to make it active in that current organization.
https://prnt.sc/eGP1d2xrK18Z
This works great, even the top popup updates to the correct arrangement.
https://prnt.sc/jqwzmyYcmCz3
Looking at the code, we think that it might be a problem that when we update the current organization it does not update the permissions, because when we look at the permissions, it continues with a permission that is not from the organization we set.
https://prnt.sc/2rf7yNGCu49u
I don't know if it makes sense, but if in this request that is made to get the data, instead of using getUserByEmail by getActiveUserByEmail, you could get the correct information:
https://prnt.sc/vJElKNoIsj5R
The text was updated successfully, but these errors were encountered: