Skip to content

Commit

Permalink
Added adminRoles to authenticated user
Browse files Browse the repository at this point in the history
  • Loading branch information
cgendreau committed Feb 14, 2025
1 parent df06567 commit 1456d83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class DinaAuthenticatedUser {
private final String username;
private final Set<String> groups;
private final Map<String, Set<DinaRole>> rolesPerGroup;
private final Set<DinaRole> adminRoles;
private final boolean isServiceAccount;

@Builder
Expand All @@ -29,13 +30,15 @@ public DinaAuthenticatedUser(
String agentIdentifier,
String internalIdentifier,
Map<String, Set<DinaRole>> rolesPerGroup,
Set<DinaRole> adminRoles,
boolean isServiceAccount
) {
this.internalIdentifier = internalIdentifier;
this.username = username;
this.agentIdentifier = agentIdentifier;
this.rolesPerGroup = rolesPerGroup == null ? Collections.emptyMap() : rolesPerGroup;
this.groups = this.rolesPerGroup.keySet();
this.adminRoles = adminRoles == null ? Set.of() : adminRoles;
this.isServiceAccount = isServiceAccount;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
*/
String[] groupRole() default "";

String[] adminRole() default "";

String agentIdentifier() default "";

String internalIdentifier() default "";
Expand Down

0 comments on commit 1456d83

Please sign in to comment.