File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 1
1
package describe
2
2
3
3
import (
4
- "bytes"
5
4
"fmt"
6
5
"path/filepath"
7
6
"sort"
@@ -1247,26 +1246,17 @@ func DescribePolicy(policy *authorizationapi.Policy) (string, error) {
1247
1246
})
1248
1247
}
1249
1248
1250
- const PolicyRuleHeadings = "Verbs\t Non-Resource URLs\t Extension \ t Resource Names\t API Groups\t Resources"
1249
+ const PolicyRuleHeadings = "Verbs\t Non-Resource URLs\t Resource Names\t API Groups\t Resources"
1251
1250
1252
1251
func DescribePolicyRule (out * tabwriter.Writer , rule authorizationapi.PolicyRule , indent string ) {
1253
- extensionString := ""
1254
1252
if rule .AttributeRestrictions != nil {
1255
- extensionString = fmt .Sprintf ("%#v" , rule .AttributeRestrictions )
1256
-
1257
- buffer := new (bytes.Buffer )
1258
-
1259
- // TODO(rebase-1.6): we probably need a non-nil encoder and decoder
1260
- printer := NewHumanReadablePrinter (nil , nil , kprinters.PrintOptions {NoHeaders : true })
1261
- if err := printer .PrintObj (rule .AttributeRestrictions , buffer ); err == nil {
1262
- extensionString = strings .TrimSpace (buffer .String ())
1263
- }
1253
+ // We are not supporting attribute restrictions going forward
1254
+ return
1264
1255
}
1265
1256
1266
- fmt .Fprintf (out , indent + "%v\t %v\t %v\t %v\t %v\t %v \ n " ,
1257
+ fmt .Fprintf (out , indent + "%v\t %v\t %v\t %v\t %v\n " ,
1267
1258
rule .Verbs .List (),
1268
1259
rule .NonResourceURLs .List (),
1269
- extensionString ,
1270
1260
rule .ResourceNames .List (),
1271
1261
rule .APIGroups ,
1272
1262
rule .Resources .List (),
You can’t perform that action at this time.
0 commit comments