Skip to content

Commit 547eb41

Browse files
bexsoftBenjamin Perezdvaldivia
authored
Added navigation to object browser (#358)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
1 parent afbb83e commit 547eb41

File tree

25 files changed

+1093
-450
lines changed

25 files changed

+1093
-450
lines changed

pkg/acl/endpoints.go

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,28 @@ import (
2222

2323
// endpoints definition
2424
var (
25-
configuration = "/configurations-list"
26-
users = "/users"
27-
groups = "/groups"
28-
iamPolicies = "/policies"
29-
dashboard = "/dashboard"
30-
profiling = "/profiling"
31-
trace = "/trace"
32-
logs = "/logs"
33-
watch = "/watch"
34-
notifications = "/notification-endpoints"
35-
buckets = "/buckets"
36-
bucketsDetail = "/buckets/:bucketName"
37-
serviceAccounts = "/service-accounts"
38-
tenants = "/tenants"
39-
tenantsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName"
40-
heal = "/heal"
41-
remoteBuckets = "/remote-buckets"
42-
replication = "/replication"
43-
objectBrowser = "/object-browser/:bucket?"
44-
mainObjectBrowser = "/object-browser"
45-
license = "/license"
25+
configuration = "/configurations-list"
26+
users = "/users"
27+
groups = "/groups"
28+
iamPolicies = "/policies"
29+
dashboard = "/dashboard"
30+
profiling = "/profiling"
31+
trace = "/trace"
32+
logs = "/logs"
33+
watch = "/watch"
34+
notifications = "/notification-endpoints"
35+
buckets = "/buckets"
36+
bucketsDetail = "/buckets/:bucketName"
37+
serviceAccounts = "/service-accounts"
38+
tenants = "/tenants"
39+
tenantsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName"
40+
heal = "/heal"
41+
remoteBuckets = "/remote-buckets"
42+
replication = "/replication"
43+
objectBrowser = "/object-browser/:bucket/*"
44+
objectBrowserBucket = "/object-browser/:bucket"
45+
mainObjectBrowser = "/object-browser"
46+
license = "/license"
4647
)
4748

4849
type ConfigurationActionSet struct {
@@ -245,25 +246,26 @@ var licenseActionSet = ConfigurationActionSet{
245246

246247
// endpointRules contains the mapping between endpoints and ActionSets, additional rules can be added here
247248
var endpointRules = map[string]ConfigurationActionSet{
248-
configuration: configurationActionSet,
249-
users: usersActionSet,
250-
groups: groupsActionSet,
251-
iamPolicies: iamPoliciesActionSet,
252-
dashboard: dashboardActionSet,
253-
profiling: profilingActionSet,
254-
trace: traceActionSet,
255-
logs: logsActionSet,
256-
watch: watchActionSet,
257-
notifications: notificationsActionSet,
258-
buckets: bucketsActionSet,
259-
bucketsDetail: bucketsActionSet,
260-
serviceAccounts: serviceAccountsActionSet,
261-
heal: healActionSet,
262-
remoteBuckets: remoteBucketsActionSet,
263-
replication: replicationActionSet,
264-
objectBrowser: objectBrowserActionSet,
265-
mainObjectBrowser: objectBrowserActionSet,
266-
license: licenseActionSet,
249+
configuration: configurationActionSet,
250+
users: usersActionSet,
251+
groups: groupsActionSet,
252+
iamPolicies: iamPoliciesActionSet,
253+
dashboard: dashboardActionSet,
254+
profiling: profilingActionSet,
255+
trace: traceActionSet,
256+
logs: logsActionSet,
257+
watch: watchActionSet,
258+
notifications: notificationsActionSet,
259+
buckets: bucketsActionSet,
260+
bucketsDetail: bucketsActionSet,
261+
serviceAccounts: serviceAccountsActionSet,
262+
heal: healActionSet,
263+
remoteBuckets: remoteBucketsActionSet,
264+
replication: replicationActionSet,
265+
objectBrowser: objectBrowserActionSet,
266+
mainObjectBrowser: objectBrowserActionSet,
267+
objectBrowserBucket: objectBrowserActionSet,
268+
license: licenseActionSet,
267269
}
268270

269271
// operatorRules contains the mapping between endpoints and ActionSets for operator only mode

pkg/acl/endpoints_test.go

Lines changed: 5 additions & 5 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: 5,
53+
want: 6,
5454
},
5555
{
5656
name: "policies endpoint",
@@ -63,7 +63,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
6363
"admin:ListUserPolicies",
6464
},
6565
},
66-
want: 5,
66+
want: 6,
6767
},
6868
{
6969
name: "all admin endpoints",
@@ -72,7 +72,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
7272
"admin:*",
7373
},
7474
},
75-
want: 16,
75+
want: 17,
7676
},
7777
{
7878
name: "all s3 endpoints",
@@ -81,7 +81,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
8181
"s3:*",
8282
},
8383
},
84-
want: 7,
84+
want: 8,
8585
},
8686
{
8787
name: "all admin and s3 endpoints",
@@ -91,7 +91,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
9191
"s3:*",
9292
},
9393
},
94-
want: 19,
94+
want: 20,
9595
},
9696
{
9797
name: "no endpoints",

portal-ui/bindata_assetfs.go

Lines changed: 235 additions & 97 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)