File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,26 @@ impl DefinitionSetTransformer for DropEmptyPolicies {
66
66
}
67
67
}
68
68
69
+ #[ derive( Default , Debug ) ]
70
+ pub struct ExcludeUsers { }
71
+
72
+ impl DefinitionSetTransformer for ExcludeUsers {
73
+ fn transform < ' a > ( & self , defs : & ' a mut ClusterDefinitionSet ) -> & ' a mut ClusterDefinitionSet {
74
+ defs. users = Vec :: new ( ) ;
75
+ defs
76
+ }
77
+ }
78
+
79
+ #[ derive( Default , Debug ) ]
80
+ pub struct ExcludePermissions { }
81
+
82
+ impl DefinitionSetTransformer for ExcludePermissions {
83
+ fn transform < ' a > ( & self , defs : & ' a mut ClusterDefinitionSet ) -> & ' a mut ClusterDefinitionSet {
84
+ defs. permissions = Vec :: new ( ) ;
85
+ defs
86
+ }
87
+ }
88
+
69
89
//
70
90
// Transformation chain
71
91
//
@@ -86,6 +106,12 @@ impl From<Vec<&str>> for TransformationChain {
86
106
"drop_empty_policies" => {
87
107
vec. push ( Box :: new ( DropEmptyPolicies :: default ( ) ) ) ;
88
108
}
109
+ "exclude_users" => {
110
+ vec. push ( Box :: new ( ExcludeUsers :: default ( ) ) ) ;
111
+ }
112
+ "exclude_permissions" => {
113
+ vec. push ( Box :: new ( ExcludePermissions :: default ( ) ) ) ;
114
+ }
89
115
_ => {
90
116
vec. push ( Box :: new ( NoOp :: default ( ) ) ) ;
91
117
}
You can’t perform that action at this time.
0 commit comments