Skip to content

Commit 7b57a57

Browse files
Merge pull request #1922 from johnduprey/dev
App Consent Reviewer Role Selection
2 parents 4ec05f5 + e5a6f7c commit 7b57a57

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

src/data/standards.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,13 @@
188188
},
189189
{
190190
"cat": "AAD",
191-
"name": "standards.EnableAppConsentRequests",
191+
"name": "standards.EnableAppConsentRequests.Enabled",
192192
"helpText": "Enables App consent admin requests for the tenant via the GA role. Does not overwrite existing reviewer settings",
193-
"addedComponent": null,
193+
"addedComponent": {
194+
"type": "AdminRolesMultiSelect",
195+
"label": "App Consent Reviewer Roles",
196+
"name": "standards.EnableAppConsentRequests.ReviewerRoles"
197+
},
194198
"label": "Enable App consent admin requests"
195199
},
196200
{

src/views/tenant/standards/ListAppliedStandards.jsx

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import Skeleton from 'react-loading-skeleton'
2222
import { CippTable } from 'src/components/tables'
2323
import allStandardsList from 'src/data/standards'
2424
import CippCodeOffCanvas from 'src/components/utilities/CippCodeOffcanvas'
25+
import GDAPRoles from 'src/data/GDAPRoles'
2526

2627
const RefreshAction = () => {
2728
const [execStandards, execStandardsResults] = useLazyGenericGetRequestQuery()
@@ -306,21 +307,33 @@ const ListAppliedStandards = () => {
306307
/>
307308
{item.addedComponent && (
308309
<Condition when={item.name} is={true}>
309-
{item.addedComponent.type === 'Select' ? (
310+
{(item.addedComponent.type === 'Select' && (
310311
<RFFCFormSelect
311312
name={item.addedComponent.name}
312313
className="mb-3"
313314
label={item.addedComponent.label}
314315
values={item.addedComponent.values}
315316
/>
316-
) : (
317-
<RFFCFormInput
318-
type="text"
319-
className="mb-3"
320-
name={item.addedComponent.name}
321-
label={item.addedComponent.label}
322-
/>
323-
)}
317+
)) ||
318+
(item.addedComponent.type === 'AdminRolesMultiSelect' && (
319+
<RFFSelectSearch
320+
multi={true}
321+
name={item.addedComponent.name}
322+
className="mb-3"
323+
label={item.addedComponent.label}
324+
values={GDAPRoles.map((role) => ({
325+
value: role.ObjectId,
326+
name: role.Name,
327+
}))}
328+
/>
329+
)) || (
330+
<RFFCFormInput
331+
type="text"
332+
className="mb-3"
333+
name={item.addedComponent.name}
334+
label={item.addedComponent.label}
335+
/>
336+
)}
324337
</Condition>
325338
)}
326339
</CCol>

0 commit comments

Comments
 (0)