File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
pages/ManagementSettingsPage Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export const checks = {
14
14
createOrganization : "createOrganization" ,
15
15
editAnyOrganization : "editAnyOrganization" ,
16
16
viewAnyGroup : "viewAnyGroup" ,
17
+ viewAllLicenses : "viewAllLicenses" ,
17
18
} as const ;
18
19
19
20
export const permissionsToCheck = {
@@ -111,6 +112,12 @@ export const permissionsToCheck = {
111
112
} ,
112
113
action : "read" ,
113
114
} ,
115
+ [ checks . viewAllLicenses ] : {
116
+ object : {
117
+ resource_type : "license" ,
118
+ } ,
119
+ action : "read" ,
120
+ } ,
114
121
} as const ;
115
122
116
123
export type Permissions = Record < keyof typeof permissionsToCheck , boolean > ;
Original file line number Diff line number Diff line change @@ -49,6 +49,15 @@ export const NoAuditLog: Story = {
49
49
} ,
50
50
} ;
51
51
52
+ export const NoLicenses : Story = {
53
+ args : {
54
+ permissions : {
55
+ ...MockPermissions ,
56
+ viewAllLicenses : false ,
57
+ } ,
58
+ } ,
59
+ } ;
60
+
52
61
export const NoDeploymentValues : Story = {
53
62
args : {
54
63
permissions : {
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ const DeploymentSettingsNavigation: FC<DeploymentSettingsNavigationProps> = (
112
112
{ props . permissions . viewDeploymentValues && (
113
113
< SidebarNavSubItem href = "general" > General</ SidebarNavSubItem >
114
114
) }
115
- { props . permissions . viewDeploymentValues && (
115
+ { props . permissions . viewAllLicenses && (
116
116
< SidebarNavSubItem href = "licenses" > Licenses</ SidebarNavSubItem >
117
117
) }
118
118
{ props . permissions . editDeploymentValues && (
Original file line number Diff line number Diff line change @@ -2498,6 +2498,7 @@ export const MockPermissions: Permissions = {
2498
2498
createOrganization : true ,
2499
2499
editAnyOrganization : true ,
2500
2500
viewAnyGroup : true ,
2501
+ viewAllLicenses : true ,
2501
2502
} ;
2502
2503
2503
2504
export const MockDeploymentConfig : DeploymentConfig = {
You can’t perform that action at this time.
0 commit comments