Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Fix three issues around 100+ roles #2613

Merged
merged 6 commits into from Jul 6, 2018
Merged

Fix three issues around 100+ roles #2613

merged 6 commits into from Jul 6, 2018

Conversation

richard-cox
Copy link
Contributor

@richard-cox richard-cox commented Jul 3, 2018

For testing would advice using deploy/tools/populate-cf/create-many-spaces.sh

Ensure users with 100+ roles are stored correctly - changes to entity-factory.ts + request-data-reducer.factory.ts

  • admin with 100+ manager and dev space roles
  • we notice that the user is missing the manager and space properties and go out and fetch
  • previously we then stored the users managed spaces in the spaces property instead of managed_spaces

Improve efficiency when calculating user other roles - changes to cf-user.service.ts

  • Need to determine if a user has roles other than org user (to determine if we show the 'cross' on org user pill)
  • This happens per org user cell per user quite a lot of times
  • Previously this recalculated roles for each space and org. these could be 100s * above
  • Now we just check the user's arrays

Ensure we don't show incorrect space roles in org users list - changes to cf-user-list-config.service.ts

  • When there are many space roles we have to fetch them asyncronously
  • Previously the org users list would briefly show all space roles (even those for spaces not in org) before showing correct list
  • We now block until we have that space list
  • CF user and space user lists should remain unaffected

- admin with 100+ manager and dev space roles
- we notice that the user is missing the manager and space properties and go out and fetch
- previously we then stored the users managed spaces in the `spaces` property instead of `managed_spaces`
- Need to determine if a user has roles other than org user (to determine if we show the 'cross' on org user pill)
- This happens per org user cell per user quite a lot of times
- Previously this recalculated roles for each space and org. these could be 100s * above
- Now we just check the user's arrays
- When there are many space roles we have to fetch them asyncronously
- Previously the org users list would briefly show all space roles (even those for spaces not in org) before showing correct list
- We now block until we have that space list
- CF user and space user lists should remain unaffected
@cfdreddbot
Copy link

Hey richard-cox!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

@codecov
Copy link

codecov bot commented Jul 3, 2018

Codecov Report

Merging #2613 into v2-master will decrease coverage by 22.08%.
The diff coverage is 37.94%.

@@              Coverage Diff               @@
##           v2-master    #2613       +/-   ##
==============================================
- Coverage      70.02%   47.94%   -22.09%     
==============================================
  Files            595      597        +2     
  Lines          25215    25342      +127     
  Branches        5694     5724       +30     
==============================================
- Hits           17657    12149     -5508     
- Misses          7558    13193     +5635

@KlapTrap KlapTrap merged commit 361899b into v2-master Jul 6, 2018
@richard-cox richard-cox deleted the fix-many-roles branch July 6, 2018 13:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants