-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix roleassignment properties issue #4906
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
Conversation
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.
@darshanhs90 two minor comments
Also, please update the Resources change log to include a snippet about the changes you are making in this PR
@@ -224,8 +224,13 @@ public List<PSRoleAssignment> FilterRoleAssignments(FilterRoleAssignmentsOptions | |||
|
|||
var tempResult = AuthorizationManagementClient.RoleAssignments.List( | |||
new Rest.Azure.OData.ODataQuery<RoleAssignmentFilter>(f => f.PrincipalId == principalId)); | |||
result.AddRange(tempResult.FilterRoleAssignmentsOnRoleId(AuthorizationHelper.ConstructFullyQualifiedRoleDefinitionIdFromScopeAndIdAsGuid(currentSubscription, options.RoleDefinitionId)) | |||
if (!string.IsNullOrEmpty(options.Scope)) { |
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.
@darshanhs90 nit: please put each opening and closing braces on lines by themselves #Resolved
@@ -224,8 +224,13 @@ public List<PSRoleAssignment> FilterRoleAssignments(FilterRoleAssignmentsOptions | |||
|
|||
var tempResult = AuthorizationManagementClient.RoleAssignments.List( | |||
new Rest.Azure.OData.ODataQuery<RoleAssignmentFilter>(f => f.PrincipalId == principalId)); | |||
result.AddRange(tempResult.FilterRoleAssignmentsOnRoleId(AuthorizationHelper.ConstructFullyQualifiedRoleDefinitionIdFromScopeAndIdAsGuid(currentSubscription, options.RoleDefinitionId)) | |||
if (!string.IsNullOrEmpty(options.Scope)) { | |||
result.AddRange(tempResult.FilterRoleAssignmentsOnRoleId(AuthorizationHelper.ConstructFullyQualifiedRoleDefinitionIdFromScopeAndIdAsGuid(currentSubscription, options.RoleDefinitionId)) | |||
.ToPSRoleAssignments(this, ActiveDirectoryClient, options.Scope, options.ExcludeAssignmentsForDeletedPrincipals)); |
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.
@darshanhs90 nit: please indent this line (and the other .ToPsRoleAssignments(...)
line below that you added) #Resolved
@azuresdkci add to whitelist |
@darshanhs90 It looks like one of your tests (Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests.RaPropertiesValidation) is failing - it might need to be re-recorded. |
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.
It looks like one of your tests is failign (Microsoft.Azure.Commands.Resources.Test.ScenarioTests.RoleAssignmentTests.RaPropertiesValidation) it might need to be re-recorded
Related to https://icm.ad.msft.net/imp/v3/incidents/details/49435437/home
caused by dcf1326#diff-e02485bad168a96ed85b20165bc08220
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines