-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AADMSGroupLifecyclePolicy #447
AADMSGroupLifecyclePolicy #447
Conversation
Codecov Report
@@ Coverage Diff @@
## Dev #447 +/- ##
======================================
Coverage 90% 90%
======================================
Files 108 109 +1
Lines 11549 11651 +102
Branches 10 10
======================================
+ Hits 10506 10602 +96
- Misses 1033 1039 +6
Partials 10 10 |
@ykuijs Can I please get a code review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments
Reviewed 7 of 10 files at r1.
Reviewable status: 7 of 10 files reviewed, 5 unresolved discussions (waiting on @NikCharlebois and @ykuijs)
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 147 at r2 (raw file):
$emails += $email + ";" } if ($emails.EndsWith(';'))
This can be done much easier with TrimEnd(";"). You don't need the if statement in that case.
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 166 at r2 (raw file):
$emails += $email + ";" } if ($emails.EndsWith(';'))
Same comments as above
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 221 at r2 (raw file):
$CurrentValues = Get-TargetResource @PSBoundParameters Write-Verbose -Message "Current Values: $(Convert-O365DscHashtableToString -Hashtable $CurrentValues)"
The Get method already displays the current values
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.schema.mof, line 8 at r2 (raw file):
[Required, Description("This parameter allows the admin to select which office 365 groups the policy will apply to. 'None' will create the policy in a disabled state. 'All' will apply the policy to every Office 365 group in the tenant. 'Selected' will allow the admin to choose specific Office 365 groups that the policy will apply to."), ValueMap{"All","None", "Selected"}, Values{"All","None", "Selected"}] String ManagedGroupTypes; [Required, Description("Notification emails for groups that have no owners will be sent to these email addresses.")] String AlternateNotificationEmails[]; [Write, Description("Specify if the Azure AD Groups Naming Policy should exist or not."), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure;
Needs to get updated to lifecycle policy instead of naming policy
Tests/Unit/Stubs/Generic.psm1, line 62 at r2 (raw file):
} function Set-AzureADMSGroupLifecyclePolicy
What about the other cmdlets like New and Remove??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 10 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @ykuijs)
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 147 at r2 (raw file):
Previously, ykuijs (Yorick Kuijs) wrote…
This can be done much easier with TrimEnd(";"). You don't need the if statement in that case.
Done.
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 166 at r2 (raw file):
Previously, ykuijs (Yorick Kuijs) wrote…
Same comments as above
Done.
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.psm1, line 221 at r2 (raw file):
Previously, ykuijs (Yorick Kuijs) wrote…
The Get method already displays the current values
Done.
Modules/Office365DSC/DSCResources/MSFT_AADMSGroupLifecyclePolicy/MSFT_AADMSGroupLifecyclePolicy.schema.mof, line 8 at r2 (raw file):
Previously, ykuijs (Yorick Kuijs) wrote…
Needs to get updated to lifecycle policy instead of naming policy
Done.
Tests/Unit/Stubs/Generic.psm1, line 62 at r2 (raw file):
Previously, ykuijs (Yorick Kuijs) wrote…
What about the other cmdlets like New and Remove??
They are in the O365 stub file and were generated dyamically. Somehow the Set did not expose the proper parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r3.
Reviewable status: complete! all files reviewed, all discussions resolved
Pull Request (PR) description
Initial Release of AADMSGroupLifecyclePolicy to manage Azure AD Groups' Expiration.
This Pull Request (PR) fixes the following issues
N/A
This change is