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 = {
1515 createOrganization : "createOrganization" ,
1616 editAnyOrganization : "editAnyOrganization" ,
1717 viewAnyGroup : "viewAnyGroup" ,
18+ viewAllLicenses : "viewAllLicenses" ,
1819} as const ;
1920
2021export const permissionsToCheck = {
@@ -117,6 +118,12 @@ export const permissionsToCheck = {
117118 } ,
118119 action : "read" ,
119120 } ,
121+ [ checks . viewAllLicenses ] : {
122+ object : {
123+ resource_type : "license" ,
124+ } ,
125+ action : "read" ,
126+ } ,
120127} as const ;
121128
122129export 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 = {
4949 } ,
5050} ;
5151
52+ export const NoLicenses : Story = {
53+ args : {
54+ permissions : {
55+ ...MockPermissions ,
56+ viewAllLicenses : false ,
57+ } ,
58+ } ,
59+ } ;
60+
5261export const NoDeploymentValues : Story = {
5362 args : {
5463 permissions : {
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ const DeploymentSettingsNavigation: FC<DeploymentSettingsNavigationProps> = (
112112 { props . permissions . viewDeploymentValues && (
113113 < SidebarNavSubItem href = "general" > General</ SidebarNavSubItem >
114114 ) }
115- { props . permissions . viewDeploymentValues && (
115+ { props . permissions . viewAllLicenses && (
116116 < SidebarNavSubItem href = "licenses" > Licenses</ SidebarNavSubItem >
117117 ) }
118118 { props . permissions . editDeploymentValues && (
Original file line number Diff line number Diff line change @@ -2499,6 +2499,7 @@ export const MockPermissions: Permissions = {
24992499 createOrganization : true ,
25002500 editAnyOrganization : true ,
25012501 viewAnyGroup : true ,
2502+ viewAllLicenses : true ,
25022503} ;
25032504
25042505export const MockDeploymentConfig : DeploymentConfig = {
You can’t perform that action at this time.
0 commit comments