Skip to content

Commit

Permalink
[Gh 974] Consumption role fix (#975)
Browse files Browse the repository at this point in the history
### Feature or Bugfix
- Bugfix

### Detail

Added `filter` variable reference in the ListConsumptionRoleApi and also
added a new filter instead of a hard coded one in the RequestModal's
ListConsumptionRoleApi.

### Relates

- #974

### Security
Please answer the questions below briefly where applicable, or write
`N/A`. Based on
[OWASP 10](https://owasp.org/Top10/en/).

- Does this PR introduce or modify any input fields or queries - this
includes
fetching data from storage outside the application (e.g. a database, an
S3 bucket)? N/A
  - Is the input sanitized?
- What precautions are you taking before deserializing the data you
consume?
  - Is injection prevented by parametrizing queries?
  - Have you ensured no `eval` or similar functions are used?
- Does this PR introduce any functionality or component that requires
authorization? N/A
- How have you ensured it respects the existing AuthN/AuthZ mechanisms?
  - Are you logging failed auth attempts?
- Are you using or adding any cryptographic features? N/A
  - Do you use a standard proven implementations?
- Are the used keys controlled by the customer? Where are they stored?
N/A
- Are you introducing any new policies/roles/users? N/A
  - Have you used the least-privilege principle? How?


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

---------

Co-authored-by: trajopadhye <[email protected]>
  • Loading branch information
TejasRGitHub and trajopadhye authored Jan 12, 2024
1 parent d6cac34 commit 2ff658d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,7 @@ export const RequestAccessModal = (props) => {
try {
const response = await client.query(
listEnvironmentConsumptionRoles({
filter: {
page: 1,
pageSize: 10,
term: '',
groupUri: groupUri
},
filter: { ...Defaults.selectListFilter, groupUri: groupUri },
environmentUri
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ export const EnvironmentTeams = ({ environment }) => {
const response = await client.query(
listAllEnvironmentGroups({
environmentUri: environment.environmentUri,
filter
filter: filter
})
);
if (!response.errors) {
Expand All @@ -285,7 +285,7 @@ export const EnvironmentTeams = ({ environment }) => {
const response = await client.query(
listAllEnvironmentConsumptionRoles({
environmentUri: environment.environmentUri,
filterRoles
filter: filterRoles
})
);
if (!response.errors) {
Expand Down

0 comments on commit 2ff658d

Please sign in to comment.