File tree 3 files changed +7
-8
lines changed
3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ const adminSettings = [
23
23
24
24
async function hasAccessToAdminSettings ( page : Page , settings : AdminSetting [ ] ) {
25
25
// Organizations and Audit Logs both require a license to be visible
26
- const visibleSettings = settings . filter (
27
- ( it ) => Boolean ( license ) || ( it !== "Organizations" && it !== "Audit Logs" ) ,
28
- ) ;
26
+ const visibleSettings = license
27
+ ? settings
28
+ : settings . filter ( ( it ) => it !== "Organizations" && it !== "Audit Logs" ) ;
29
29
const adminSettingsButton = page . getByRole ( "button" , {
30
30
name : "Admin settings" ,
31
31
} ) ;
Original file line number Diff line number Diff line change @@ -180,7 +180,6 @@ export const canViewDeploymentSettings = (
180
180
permissions !== undefined &&
181
181
( permissions . viewDeploymentValues ||
182
182
permissions . viewAllLicenses ||
183
- permissions . viewDeploymentValues ||
184
183
permissions . viewAllUsers ||
185
184
permissions . viewAnyGroup ||
186
185
permissions . viewNotificationTemplate ||
Original file line number Diff line number Diff line change @@ -17,10 +17,6 @@ const DeploymentSettingsLayout: FC = () => {
17
17
const { permissions } = useAuthenticated ( ) ;
18
18
const location = useLocation ( ) ;
19
19
20
- // The deployment settings page also contains users and groups and more so
21
- // this page must be visible if you can see any of these.
22
- const canViewDeploymentSettingsPage = canViewDeploymentSettings ( permissions ) ;
23
-
24
20
if ( location . pathname === "/deployment" ) {
25
21
return (
26
22
< Navigate
@@ -34,6 +30,10 @@ const DeploymentSettingsLayout: FC = () => {
34
30
) ;
35
31
}
36
32
33
+ // The deployment settings page also contains users and groups and more so
34
+ // this page must be visible if you can see any of these.
35
+ const canViewDeploymentSettingsPage = canViewDeploymentSettings ( permissions ) ;
36
+
37
37
return (
38
38
< RequirePermission isFeatureVisible = { canViewDeploymentSettingsPage } >
39
39
< div >
You can’t perform that action at this time.
0 commit comments