Skip to content

Commit e104c4a

Browse files
authored
Fix Endpoints for Object Browser (#1028)
Signed-off-by: Daniel Valdivia <[email protected]>
1 parent ba051df commit e104c4a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

pkg/acl/endpoints.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ var (
3535
bucketsGeneral = "/buckets/*"
3636
bucketsAdmin = "/buckets/:bucketName/admin/*"
3737
bucketsAdminMain = "/buckets/:bucketName/admin"
38+
bucketsBrowserMenu = "/buckets"
39+
bucketsBrowserList = "/buckets/*"
3840
bucketsBrowser = "/buckets/:bucketName/browse/*"
3941
bucketsBrowserMain = "/buckets/:bucketName/browse"
4042
serviceAccounts = "/account"
@@ -300,6 +302,8 @@ var endpointRules = map[string]ConfigurationActionSet{
300302
remoteBuckets: remoteBucketsActionSet,
301303
replication: replicationActionSet,
302304
bucketsBrowser: objectBrowserActionSet,
305+
bucketsBrowserMenu: objectBrowserActionSet,
306+
bucketsBrowserList: objectBrowserActionSet,
303307
bucketsBrowserMain: objectBrowserActionSet,
304308
license: licenseActionSet,
305309
watch: watchActionSet,

pkg/acl/endpoints_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
5050
args: args{
5151
[]string{"admin:ServerInfo"},
5252
},
53-
want: 7,
53+
want: 9,
5454
},
5555
{
5656
name: "policies endpoint",
@@ -63,7 +63,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
6363
"admin:ListUserPolicies",
6464
},
6565
},
66-
want: 7,
66+
want: 9,
6767
},
6868
{
6969
name: "all admin endpoints",
@@ -72,7 +72,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
7272
"admin:*",
7373
},
7474
},
75-
want: 21,
75+
want: 23,
7676
},
7777
{
7878
name: "all s3 endpoints",
@@ -98,7 +98,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
9898
args: args{
9999
[]string{},
100100
},
101-
want: 5,
101+
want: 7,
102102
},
103103
}
104104

0 commit comments

Comments
 (0)