File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
api/src/main/java/io/kafbat/ui Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,6 @@ public List<Role> getRoles() {
2727 return roles ;
2828 }
2929
30- public void setDefaultRole (DefaultRole defaultRole ) {
31- this .defaultRole = defaultRole ;
32- }
33-
3430 @ Nullable
3531 public DefaultRole getDefaultRole () {
3632 return defaultRole ;
Original file line number Diff line number Diff line change @@ -87,7 +87,8 @@ public void init() {
8787 .flatMap (Set ::stream )
8888 .collect (Collectors .toSet ());
8989
90- if (!(properties .getRoles ().isEmpty () && properties .getDefaultRole () == null )
90+ boolean hasRolesConfigured = !properties .getRoles ().isEmpty () || properties .getDefaultRole () != null ;
91+ if (hasRolesConfigured
9192 && "oauth2" .equalsIgnoreCase (environment .getProperty ("auth.type" ))
9293 && (clientRegistrationRepository == null || !clientRegistrationRepository .iterator ().hasNext ())) {
9394 log .error ("Roles are configured but no authentication methods are present. Authentication might fail." );
You can’t perform that action at this time.
0 commit comments