Skip to content

Commit c53a8bd

Browse files
authored
Merge pull request #6 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents da5df36 + 4b36eae commit c53a8bd

File tree

4 files changed

+59
-16
lines changed

4 files changed

+59
-16
lines changed

src/components/forms/RFFComponents.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ RFFCFormCheck.propTypes = {
7575
...sharedPropTypes,
7676
}
7777

78-
export const RFFCFormSwitch = ({ name, label, className = 'mb-3', validate, disabled = false }) => {
78+
export const RFFCFormSwitch = ({
79+
name,
80+
label,
81+
sublabel,
82+
className = 'mb-3',
83+
validate,
84+
disabled = false,
85+
}) => {
7986
return (
8087
<Field name={name} type="checkbox" validate={validate}>
8188
{({ meta, input }) => (
@@ -90,6 +97,7 @@ export const RFFCFormSwitch = ({ name, label, className = 'mb-3', validate, disa
9097
label={label}
9198
/>
9299
{input.value && <RFFCFormFeedback meta={meta} />}
100+
<sub>{sublabel}</sub>
93101
</div>
94102
)}
95103
</Field>

src/views/cipp/CIPPSettings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,7 @@ const NotificationsSettings = () => {
10161016
label="Choose which logs you'd like to receive alerts from. This notification will be sent every 15 minutes."
10171017
name="logsToInclude"
10181018
values={[
1019+
{ value: 'Updates', name: 'Updates Status' },
10191020
{ value: 'Standards', name: 'All Standards' },
10201021
{ value: 'TokensUpdater', name: 'Token Events' },
10211022
{ value: 'ExecDnsConfig', name: 'Changing DNS Settings' },

src/views/identity/administration/Users.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -363,57 +363,57 @@ const Users = (row) => {
363363
{
364364
label: 'Convert to Shared Mailbox',
365365
modal: true,
366-
modalUrl: `/api/ExecConvertToSharedMailbox?TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName`,
366+
modalUrl: `/api/ExecConvertToSharedMailbox?TenantFilter=!Tenant&ID=!userPrincipalName`,
367367
modalMessage: 'Are you sure you want to convert these users to a shared mailbox?',
368368
},
369369
{
370370
label: 'Rerequire MFA registration',
371371
modal: true,
372-
modalUrl: `/api/ExecResetMFA?TenantFilter=${tenant.defaultDomainName}&ID=!id`,
372+
modalUrl: `/api/ExecResetMFA?TenantFilter=!Tenant&ID=!id`,
373373
modalMessage: 'Are you sure you want to enable MFA for these users?',
374374
},
375375
{
376376
label: 'Enable Online Archive',
377377
color: 'info',
378378
modal: true,
379-
modalUrl: `/api/ExecEnableArchive?TenantFilter=${tenant.defaultDomainName}&ID=!id`,
379+
modalUrl: `/api/ExecEnableArchive?TenantFilter=!Tenant&ID=!id`,
380380
modalMessage: 'Are you sure you want to enable the online archive for these users?',
381381
},
382382
{
383383
label: 'Reset Password (Must Change)',
384384
color: 'info',
385385
modal: true,
386-
modalUrl: `/api/ExecResetPass?MustChange=true&TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName&displayName=!displayName`,
386+
modalUrl: `/api/ExecResetPass?MustChange=true&TenantFilter=!Tenant&ID=!userPrincipalName&displayName=!displayName`,
387387
modalMessage:
388388
'Are you sure you want to reset the password for these users? The users must change their password at next logon.',
389389
},
390390
{
391391
label: 'Reset Password',
392392
color: 'info',
393393
modal: true,
394-
modalUrl: `/api/ExecResetPass?MustChange=false&TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName&displayName=!displayName`,
394+
modalUrl: `/api/ExecResetPass?MustChange=false&TenantFilter=!Tenant&ID=!userPrincipalName&displayName=!displayName`,
395395
modalMessage:
396396
'Are you sure you want to reset the password for these users? The users must change their password at next logon.',
397397
},
398398
{
399399
label: 'Block signin',
400400
color: 'info',
401401
modal: true,
402-
modalUrl: `/api/ExecDisableUser?TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName`,
402+
modalUrl: `/api/ExecDisableUser?TenantFilter=!Tenant&ID=!userPrincipalName`,
403403
modalMessage: 'Are you sure you want to disable these users?',
404404
},
405405
{
406406
label: 'Unblock signin',
407407
color: 'info',
408408
modal: true,
409-
modalUrl: `/api/ExecDisableUser?Enable=true&TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName`,
409+
modalUrl: `/api/ExecDisableUser?Enable=true&TenantFilter=!Tenant&ID=!userPrincipalName`,
410410
modalMessage: 'Are you sure you want to enable these users?',
411411
},
412412
{
413413
label: 'Revoke sessions',
414414
color: 'info',
415415
modal: true,
416-
modalUrl: `/api/ExecRevokeSessions?Enable=true&TenantFilter=${tenant.defaultDomainName}&ID=!userPrincipalName`,
416+
modalUrl: `/api/ExecRevokeSessions?Enable=true&TenantFilter=!Tenant&ID=!userPrincipalName`,
417417
modalMessage: 'Are you sure you want to revoke all sessions for these users?',
418418
},
419419
{
@@ -459,7 +459,7 @@ const Users = (row) => {
459459
label: 'Delete User',
460460
color: 'danger',
461461
modal: true,
462-
modalUrl: `/api/RemoveUser?TenantFilter=${tenant.defaultDomainName}&ID=!id`,
462+
modalUrl: `/api/RemoveUser?TenantFilter=!Tenant&ID=!id`,
463463
modalMessage: 'Are you sure you want to delete these users?',
464464
},
465465
],

src/views/tenant/standards/ListAppliedStandards.js

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,15 @@ const ListAppliedStandards = () => {
131131
const [caGetRequest, caTemplates] = useLazyGenericGetRequestQuery()
132132
const [groupGetRequest, groupTemplates] = useLazyGenericGetRequestQuery()
133133
const initialValues = listStandardResults[0]
134-
console.log(initialValues)
134+
const allTenantsStandard = listStandardsAllTenants.find(
135+
(tenant) => tenant.displayName === 'AllTenants',
136+
)
137+
function getLabel(item) {
138+
const keys = item.name.split('.')
139+
let value = keys.reduce((prev, curr) => prev && prev[curr], allTenantsStandard)
140+
return value ? `* Enabled via All Tenants` : ''
141+
}
142+
135143
return (
136144
<CippPage title="Standards" tenantSelector={false}>
137145
<>
@@ -175,7 +183,13 @@ const ListAppliedStandards = () => {
175183
.filter((obj) => obj.cat === 'Global')
176184
.map((item, key) => (
177185
<>
178-
<RFFCFormSwitch key={key} name={item.name} label={item.label} />
186+
{console.log(item.name)}
187+
<RFFCFormSwitch
188+
key={key}
189+
name={item.name}
190+
label={item.label}
191+
sublabel={getLabel(item)}
192+
/>
179193
{item.addedComponent && (
180194
<Condition when={item.name} is={true}>
181195
{item.addedComponent.type === 'Select' ? (
@@ -204,7 +218,12 @@ const ListAppliedStandards = () => {
204218
.filter((obj) => obj.cat === 'AAD')
205219
.map((item, key) => (
206220
<>
207-
<RFFCFormSwitch key={key} name={item.name} label={item.label} />
221+
<RFFCFormSwitch
222+
key={key}
223+
name={item.name}
224+
label={item.label}
225+
sublabel={getLabel(item)}
226+
/>
208227
{item.addedComponent && (
209228
<Condition when={item.name} is={true}>
210229
{item.addedComponent.type === 'Select' ? (
@@ -233,7 +252,12 @@ const ListAppliedStandards = () => {
233252
.filter((obj) => obj.cat === 'Exchange')
234253
.map((item, key) => (
235254
<>
236-
<RFFCFormSwitch key={key} name={item.name} label={item.label} />
255+
<RFFCFormSwitch
256+
key={key}
257+
name={item.name}
258+
label={item.label}
259+
sublabel={getLabel(item)}
260+
/>
237261
{item.addedComponent && (
238262
<Condition when={item.name} is={true}>
239263
{item.addedComponent.type === 'Select' ? (
@@ -262,7 +286,12 @@ const ListAppliedStandards = () => {
262286
.filter((obj) => obj.cat === 'Intune')
263287
.map((item, key) => (
264288
<>
265-
<RFFCFormSwitch key={key} name={item.name} label={item.label} />
289+
<RFFCFormSwitch
290+
key={key}
291+
name={item.name}
292+
label={item.label}
293+
sublabel={getLabel(item)}
294+
/>
266295
{item.addedComponent && (
267296
<Condition when={item.name} is={true}>
268297
{item.addedComponent.type === 'Select' ? (
@@ -291,7 +320,12 @@ const ListAppliedStandards = () => {
291320
.filter((obj) => obj.cat === 'SharePoint')
292321
.map((item, key) => (
293322
<>
294-
<RFFCFormSwitch key={key} name={item.name} label={item.label} />
323+
<RFFCFormSwitch
324+
key={key}
325+
name={item.name}
326+
label={item.label}
327+
sublabel={getLabel(item)}
328+
/>
295329
{item.addedComponent && (
296330
<Condition when={item.name} is={true}>
297331
{item.addedComponent.type === 'Select' ? (

0 commit comments

Comments
 (0)