Skip to content

Commit

Permalink
Improve RBAC logging. Relates to #408
Browse files Browse the repository at this point in the history
  • Loading branch information
Haarolean committed May 25, 2024
1 parent c06385d commit 78dd0fb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/java/io/kafbat/ui/model/rbac/Role.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.kafbat.ui.model.rbac;

import com.google.common.base.Preconditions;
import java.util.List;
import lombok.Data;

Expand All @@ -12,6 +13,7 @@ public class Role {
List<Permission> permissions;

public void validate() {
Preconditions.checkArgument(!clusters.isEmpty(), "Role clusters cannot be empty");
permissions.forEach(Permission::transform);
permissions.forEach(Permission::validate);
}
Expand Down

0 comments on commit 78dd0fb

Please sign in to comment.