fix: improve role detachment logic in DetachRolesFromSP method#179
Conversation
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR improves the role detachment logic in the DetachRolesFromSP method by refactoring the conditional checks and adding support for detaching all role assignments when no specific role is provided. The changes restructure the code to be more defensive against nil values and clarify the control flow.
Key Changes
- Added nil safety check for
roleAssignment.IDbefore processing - Restructured the conditional logic to support detaching all role assignments when
RoleDefinitionResourceIDis empty - Improved nil handling for
roleAssignment.PropertiesandroleAssignment.Properties.RoleDefinitionID
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…adjust .gitignore Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
d039e86 to
6c2445f
Compare
…kflows Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 15 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
…container.json Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 17 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.