Skip to content

Commit 8ff4250

Browse files
learn-workday: Fix CQL rule to use teams instead of allowners to overcome problem when email user is also an owner.
1 parent c7355d9 commit 8ff4250

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

data/scorecards/learn-workday.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ ladder:
2222
color: "#7CCB92"
2323
rules:
2424
- title: Learned
25-
expression: ownership.allOwners().filter((member) => member.name.matchesIn("Sophia
26-
Jenkins") and member.identityProviderSources.any(group=> group.source=="WORKDAY"
27-
and group.groupIdentifier == "ENG-UI-TEAM")).length > 0
25+
expression: ownership.teams().filter(team => team.identityProviderGroups.any(group
26+
=> group.source == "WORKDAY" and group.groupIdentifier == "ENG-UI-TEAM") and team.members.any(member
27+
=> member.name == "Sophia Jenkins")).length > 0
2828
identifier: 921bc595-5a12-3aa1-af45-e17d17e0d649
2929
weight: 1
3030
level: Completed
@@ -93,6 +93,9 @@ rules:
9393
The CQL rule for this Scorecard verifies that one of the teams from the mock Workday report, ui-engineering-team-tina-chen, was added as an owner of the Learn Cortex. It checks to see if one of the members of that team, Sophie Jenkins, appears in the list of all owners of the Learn Cortex entity.
9494
filter:
9595
kind: GENERIC
96+
types:
97+
include:
98+
- service
9699
groups:
97100
include:
98101
- learn-cortex

0 commit comments

Comments
 (0)