File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,21 @@ export const enableUserPermissions = [IAM_SCOPES.ADMIN_ENABLE_USER];
461
461
462
462
export const disableUserPermissions = [ IAM_SCOPES . ADMIN_DISABLE_USER ] ;
463
463
464
+ //note that adminUserPermissions does NOT include ADMIN_CREATE_USER to allow hiding the Users tab for users wtih only this permission as it is being applied by default
465
+ export const adminUserPermissions = [
466
+ IAM_SCOPES . ADMIN_LIST_USER_POLICIES ,
467
+ IAM_SCOPES . ADMIN_LIST_USERS ,
468
+ IAM_SCOPES . ADMIN_ADD_USER_TO_GROUP ,
469
+ IAM_SCOPES . ADMIN_REMOVE_USER_FROM_GROUP ,
470
+ IAM_SCOPES . ADMIN_ATTACH_USER_OR_GROUP_POLICY ,
471
+ IAM_SCOPES . ADMIN_LIST_USERS ,
472
+ IAM_SCOPES . ADMIN_DELETE_USER ,
473
+ IAM_SCOPES . ADMIN_ENABLE_USER ,
474
+ IAM_SCOPES . ADMIN_DISABLE_USER ,
475
+ IAM_SCOPES . ADMIN_GET_USER ,
476
+ IAM_SCOPES . ADMIN_LIST_USER_POLICIES ,
477
+ ] ;
478
+
464
479
export const assignIAMPolicyPermissions = [
465
480
IAM_SCOPES . ADMIN_ATTACH_USER_OR_GROUP_POLICY ,
466
481
IAM_SCOPES . ADMIN_LIST_USER_POLICIES ,
Original file line number Diff line number Diff line change 17
17
import { IMenuItem } from "./Menu/types" ;
18
18
import { NavLink } from "react-router-dom" ;
19
19
import {
20
+ adminUserPermissions ,
20
21
CONSOLE_UI_RESOURCE ,
21
22
IAM_PAGES ,
22
23
IAM_PAGES_PERMISSIONS ,
@@ -85,8 +86,9 @@ export const validRoutes = (
85
86
id : "users" ,
86
87
to : IAM_PAGES . USERS ,
87
88
customPermissionFnc : ( ) =>
88
- hasPermission ( CONSOLE_UI_RESOURCE , [ IAM_SCOPES . ADMIN_LIST_USERS ] ) ||
89
- hasPermission ( S3_ALL_RESOURCES , [ IAM_SCOPES . ADMIN_CREATE_USER ] ) ,
89
+ hasPermission ( CONSOLE_UI_RESOURCE , adminUserPermissions ) ||
90
+ hasPermission ( S3_ALL_RESOURCES , adminUserPermissions ) ||
91
+ hasPermission ( CONSOLE_UI_RESOURCE , [ IAM_SCOPES . ADMIN_ALL_ACTIONS ] ) ,
90
92
name : "Users" ,
91
93
icon : UsersMenuIcon ,
92
94
fsHidden : ldapIsEnabled ,
You can’t perform that action at this time.
0 commit comments