mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 20:50:06 -03:30
Prevents unauthorized users from seeing instances list link in side nav
This commit is contained in:
@@ -186,6 +186,7 @@ function getRouteConfig(userProfile = {}) {
|
|||||||
if (userProfile?.isOrgAdmin) return routeConfig;
|
if (userProfile?.isOrgAdmin) return routeConfig;
|
||||||
deleteRoute('instance_groups');
|
deleteRoute('instance_groups');
|
||||||
deleteRoute('topology_view');
|
deleteRoute('topology_view');
|
||||||
|
deleteRoute('instances');
|
||||||
if (!userProfile?.isNotificationAdmin) deleteRoute('notification_templates');
|
if (!userProfile?.isNotificationAdmin) deleteRoute('notification_templates');
|
||||||
|
|
||||||
return routeConfig;
|
return routeConfig;
|
||||||
|
|||||||
@@ -127,7 +127,6 @@ describe('getRouteConfig', () => {
|
|||||||
'/teams',
|
'/teams',
|
||||||
'/credential_types',
|
'/credential_types',
|
||||||
'/notification_templates',
|
'/notification_templates',
|
||||||
'/instances',
|
|
||||||
'/applications',
|
'/applications',
|
||||||
'/execution_environments',
|
'/execution_environments',
|
||||||
]);
|
]);
|
||||||
@@ -151,7 +150,6 @@ describe('getRouteConfig', () => {
|
|||||||
'/users',
|
'/users',
|
||||||
'/teams',
|
'/teams',
|
||||||
'/credential_types',
|
'/credential_types',
|
||||||
'/instances',
|
|
||||||
'/applications',
|
'/applications',
|
||||||
'/execution_environments',
|
'/execution_environments',
|
||||||
]);
|
]);
|
||||||
@@ -175,7 +173,6 @@ describe('getRouteConfig', () => {
|
|||||||
'/users',
|
'/users',
|
||||||
'/teams',
|
'/teams',
|
||||||
'/credential_types',
|
'/credential_types',
|
||||||
'/instances',
|
|
||||||
'/applications',
|
'/applications',
|
||||||
'/execution_environments',
|
'/execution_environments',
|
||||||
]);
|
]);
|
||||||
@@ -204,7 +201,6 @@ describe('getRouteConfig', () => {
|
|||||||
'/teams',
|
'/teams',
|
||||||
'/credential_types',
|
'/credential_types',
|
||||||
'/notification_templates',
|
'/notification_templates',
|
||||||
'/instances',
|
|
||||||
'/applications',
|
'/applications',
|
||||||
'/execution_environments',
|
'/execution_environments',
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user