-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix Bug in Role Helper #142
Conversation
|
||
// get list of workspaceIds | ||
workspaceIds := lo.Map(input.WorkspaceRoles, func(role iam.WorkspaceRole, _ int) string { | ||
return role.WorkspaceId | ||
}) | ||
|
||
// check if deploymentWorkspaceIds are in workspaceIds | ||
workspaceIds = lo.Intersect(lo.Uniq(workspaceIds), lo.Uniq(deploymentWorkspaceIds)) | ||
workspaceIds = lo.Intersect(lo.Uniq(workspaceIds), deploymentWorkspaceIds) |
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.
can we have a test case where before this change it would fail and after it would pass
}, | ||
{ | ||
Role: "DEPLOYMENT_ADMIN", | ||
EntityId: "cm070pg0r00wd01qgnskk0dir", |
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.
where did this deploymentId
come from?
should we create a deployment for this test and use that one instead?
Description
Fixes bug in
ValidateWorkspaceDeploymentRoles
where users weren't able to assign multiple deployment roles under the same workspace🎟 Issue(s)
🧪 Functional Testing
📸 Screenshots
📋 Checklist
examples/
directory