Skip to content
This repository has been archived by the owner on Mar 11, 2021. It is now read-only.

Adding a collaborator fails with 200 response #1354

Closed
michaelkleinhenz opened this issue May 31, 2017 · 6 comments
Closed

Adding a collaborator fails with 200 response #1354

michaelkleinhenz opened this issue May 31, 2017 · 6 comments
Labels

Comments

@michaelkleinhenz
Copy link
Collaborator

I can not add collaborators to the osio space on prod. I am logged in as openshiftio. When adding a new collaborator, a POST request is sent to the backend at
https://api.openshift.io/api/spaces/020f756e-b51a-4b43-b113-45cec16b9ce9/collaborators

with the payload:

{"data":[{"attributes":{"bio":"","company":"RedHat","created-at":"2017-04-21T07:13:25.4383Z","email":"[email protected]","fullName":"Dhriti Shikhar","identityID":"e89e0ab9-6337-4de6-b427-f66537794d36","imageURL":"https://www.gravatar.com/avatar/88a995820b20651e38b9cd6b585ff60d.jpg","updated-at":"2017-05-31T10:30:50.929545Z","url":"","userID":"ac1b0dc8-dd58-4da3-a1d5-677f58774a90","username":"dshikhar"},"id":"e89e0ab9-6337-4de6-b427-f66537794d36","type":"identities"}]}

The request gets a 200 response and the new collaborator shows up in the list. But after a reload, the collaborator is not in the list anymore and also don't has colaborator permissions.

@michaelkleinhenz
Copy link
Collaborator Author

Explored that a bit further:

  • the bug does not show on prod-preview
  • the bug does not show on a personal osio of my user
  • the bug also shows when using an incognito window on osio
    -> I think this is something that is attached to the osio space.

@alexeykazakov
Copy link
Contributor

@michaelkleinhenz
I see Dhriti in the list of collaborators - https://api.openshift.io/api/spaces/020f756e-b51a-4b43-b113-45cec16b9ce9/collaborators?page[offset]=20&page[limit]=20
But please note that he is on the second page by default.
Do you really see a user disappeared from the API response or it's just an UI issue?

@joshuawilson you were investigating this issue. Did you find anything?

@joshuawilson
Copy link
Member

I think that the pagination in the API is limiting the display to 20 and the UI hasn't implemented pagination for it yet. We are working on it now.

@michaelkleinhenz As a work around, adding people works even if you can't see them in the list.

@alexeykazakov
Copy link
Contributor

@joshuawilson 20 is a limit by default. But you can specify whatever limit you want.
For example https://api.openshift.io/api/spaces/020f756e-b51a-4b43-b113-45cec16b9ce9/collaborators?page[limit]=100 will return the first 100 collaborators.

@joshuawilson
Copy link
Member

Yeah, I understand. We just need to update the UI.

@alexeykazakov
Copy link
Contributor

Looks like it's being addressed in fabric8-ui/ngx-fabric8-wit#102
Closing. @michaelkleinhenz please reopen if you still see some issues with the API.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants