cloudfoundry / cloudfoundry/stratos

Fix fetch of roles when user is not an admin

Open
#4,208 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
267
Forks
137
Avg merge
5h 14m
Merged PRs (30d)
77

Description

  • Need to know roles of user connected to cf for permissions model
  • for non-admins we go out to each type of role and fetch them for current user
    • do we do this instead of fetching individual user for maxed reasons?
  • the roles results are 'flattened' (all pages fetched)

Issues

  • at some point during v3 these now no-longer respect the 'maxed' list concept. this would be fixed by the updating to new flattener (see below)
  • the code to flatten should be replaced with the generic pipeline flatten, see
    • (old, current) src/frontend/packages/store/src/helpers/paginated-request-helpers.ts
    • (new) src/frontend/packages/store/src/entity-request-pipeline/pagination-request-base-handlers/pagination-iterator.pipe.ts

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/frontend/packages/store/src/helpers/paginated-request-helpers.ts and compare it with src/frontend/packages/store/src/entity-request-pipeline/pagination-request-base-handlers/pagination-iterator.pipe.ts. Trace the non-admin role-fetch path and how its flattened results are consumed. Done means the generic pipeline flattener is used and the role requests respect the maxed list concept.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.