Skip to content

Commit b982b6e

Browse files
committed
Add userId to SpecExpressionContext
1 parent f768d0f commit b982b6e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/spec/expression/SpecExpressionContext.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public class SpecExpressionContext {
5252
// private SAMLCredential samlCredential;
5353
LdapUserDetails ldapUser;
5454
List<String> groups;
55+
String userId;
5556

5657
/**
5758
* Convert a {@see String} to a list of strings, by splitting according to the provided regex and trimming each result
@@ -134,6 +135,7 @@ public static SpecExpressionContext create(SpecExpressionContextBuilder builder,
134135
}
135136
if (o instanceof Authentication) {
136137
builder.groups = Arrays.asList(UserService.getGroups((Authentication) o));
138+
builder.userId = ((Authentication) o).getName();
137139
}
138140
}
139141
return builder.build();

0 commit comments

Comments
 (0)