File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -284,12 +284,9 @@ func GetAuthorizedEndpoints(actions []string) []string {
284284 rangeTake = operatorRules
285285 }
286286
287- if len (actions ) == 0 {
288- return []string {}
289- }
290287 // Prepare new ActionSet structure that will hold all the user actions
291288 userAllowedAction := actionsStringToActionSet (actions )
292- allowedEndpoints := []string {}
289+ var allowedEndpoints []string
293290 for endpoint , rules := range rangeTake {
294291 // check if user policy matches s3:* or admin:* typesIntersection
295292 endpointActionTypes := rules .actionTypes
Original file line number Diff line number Diff line change @@ -94,11 +94,11 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
9494 want : 16 ,
9595 },
9696 {
97- name : "no endpoints" ,
97+ name : "Console User - default endpoints" ,
9898 args : args {
9999 []string {},
100100 },
101- want : 0 ,
101+ want : 5 ,
102102 },
103103 }
104104
@@ -138,11 +138,11 @@ func TestOperatorOnlyEndpoints(t *testing.T) {
138138 want : 2 ,
139139 },
140140 {
141- name : "Operator Only - no endpoints" ,
141+ name : "Operator Only - default endpoints" ,
142142 args : args {
143143 []string {},
144144 },
145- want : 0 ,
145+ want : 2 ,
146146 },
147147 }
148148
You can’t perform that action at this time.
0 commit comments