Creating a new user throws an error.
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Attachments
relates to
Checklist
hideTestRail: Results
Activity

Charlotte Whitt September 1, 2017 at 10:02 AM
Manual test in FOLIO test http://folio-testing.aws.indexdata.com/, version @folio/users 2.9.100497, using Chrome.
Thanks , this morning all looks good, and I can add new user without an address, and with an address. I'll close the issue as done.

Niels Erik Nielsen August 31, 2017 at 11:08 PM
folio-testing is up. Ran four successful tests of creating users:

Charlotte Whitt August 31, 2017 at 9:37 PM
I just did a manual test in FOLIO test http://folio-testing.aws.indexdata.com/, using Chrome, and I get the same 'old' error message, as Jakub did (upload screen dump). I can try again tomorrow, when the test site has been rebuild.

Niels Erik Nielsen August 31, 2017 at 8:57 PMEdited
Update: For now we've defused the race condition by changing the order of operations, since it's the (previously) first request, mutator.users.POST(user), that triggers the premature refresh of the user details view.
By moving this request to the end and having the raw fetch requests (postCreds, postPerms) execute first, and, by furthermore having all three POST requests chained by promises, the app should no longer refresh its resources for display of the user before the user is actually created.
Evaluated the execution logs and ran multiple tests. Should maybe see that it all works on staging testing before releasing ui-users, though.

Jason Skomorowski August 31, 2017 at 1:11 PM
Actually, the promises are working fine (I think). It's the code that refreshes other components mutating the same endpoint---that's a redux observable "epic" that causes a refresh action to be fired for selectedUser. Unfortunately, that refresh was broken on my local checkout due to an errant copy of rxjs in my stripes-redux node_modules causing epics to silently noop, including when I ran the test suite here before pushing that up. And even if the refresh wasn't an epic the error alert box is. I'll look into addressing this immediately after our 9:15 meeting, sorry.
And oh, nice, we don't have to chain it? I can definitely set it to happen at the same time.
The user seems to be created all right, but on the return to the detailed view an alert box pops up: