File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
kafka-ui-api/src/main/java/com/provectus/kafka/ui/model/rbac Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
package com .provectus .kafka .ui .model .rbac ;
2
2
3
+ import static com .provectus .kafka .ui .model .rbac .Resource .APPLICATIONCONFIG ;
3
4
import static com .provectus .kafka .ui .model .rbac .Resource .CLUSTERCONFIG ;
4
5
import static com .provectus .kafka .ui .model .rbac .Resource .KSQL ;
5
6
25
26
@ EqualsAndHashCode
26
27
public class Permission {
27
28
29
+ private static final List <Resource > RBAC_ACTION_EXEMPT_LIST = List .of (KSQL , CLUSTERCONFIG , APPLICATIONCONFIG );
30
+
28
31
Resource resource ;
29
32
List <String > actions ;
30
33
@@ -50,7 +53,7 @@ public void setActions(List<String> actions) {
50
53
51
54
public void validate () {
52
55
Assert .notNull (resource , "resource cannot be null" );
53
- if (!List . of ( KSQL , CLUSTERCONFIG ) .contains (this .resource )) {
56
+ if (!RBAC_ACTION_EXEMPT_LIST .contains (this .resource )) {
54
57
Assert .notNull (value , "permission value can't be empty for resource " + resource );
55
58
}
56
59
}
You can’t perform that action at this time.
0 commit comments