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 @@ -15,6 +15,7 @@ export const checks = {
15
15
createOrganization : "createOrganization" ,
16
16
editAnyOrganization : "editAnyOrganization" ,
17
17
viewAnyGroup : "viewAnyGroup" ,
18
+ viewAllLicenses : "viewAllLicenses" ,
18
19
} as const ;
19
20
20
21
export const permissionsToCheck = {
@@ -117,6 +118,12 @@ export const permissionsToCheck = {
117
118
} ,
118
119
action : "read" ,
119
120
} ,
121
+ [ checks . viewAllLicenses ] : {
122
+ object : {
123
+ resource_type : "license" ,
124
+ } ,
125
+ action : "read" ,
126
+ } ,
120
127
} as const ;
121
128
122
129
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 @@ -2499,6 +2499,7 @@ export const MockPermissions: Permissions = {
2499
2499
createOrganization : true ,
2500
2500
editAnyOrganization : true ,
2501
2501
viewAnyGroup : true ,
2502
+ viewAllLicenses : true ,
2502
2503
} ;
2503
2504
2504
2505
export const MockDeploymentConfig : DeploymentConfig = {
You can’t perform that action at this time.
0 commit comments